What is Dubbo?

Apache Dubbo is a high-performance, lightweight, open source Java RPC framework that provides three core capabilities: interface-oriented remote method invocation, intelligent fault tolerance and load balancing, and automatic service registration and discovery. Dubbo is a distributed services framework dedicated to providing high-performance and transparent RPC remote service invocation solutions, as well as SOA service governance solutions.

What is RPC? RPC principles?

What is RPC?

Remote Procedure Call (RPC) Remote Procedure Call. It is a protocol that requests services from remote computer programs over a network without requiring knowledge of the underlying network technology. If two different services A and B are deployed on two different machines, if service A wants to invoke A method in service B, it is possible to use HTTP requests, but it is slower and some optimizations are not well done, and it is not secure. RPC was invented to solve this problem.

RPC principles?

With HTTP, why Dubbo?

Answer from the following two points:

  • The definition of Dubbo

  • Advantages of RPC over HTTP

    SOA Service Oriented Architecture (SOA) is the separation of projects into Service layer and presentation layer according to business logic. The service layer contains business logic and only needs to provide services externally. The presentation layer only needs to handle the interaction with the page, and the business logic is implemented by invoking the services of the service layer. There are two main roles in an SOA architecture: service providers and service consumers.

Dubbo has four features:

  1. Load balancing: Which machine to invoke when the same service is deployed on different machines
  2. Service invocation link generation: With the development of the system, there are more and more services, and the dependency relationship between services is complicated. It is not even clear which application should be started before which application, and the architect cannot describe the architectural relationship of the application completely. Dubbo can help us figure out how services call each other.
  3. Service access pressure and duration statistics, resource scheduling, and governance: Manage cluster capacity in real time based on access pressure to improve cluster access rates.
  4. Service degradation: When a service fails, the standby service is invoked.

Four, what is distributed? Why distributed?

What is distributed?

An important aspect of SOA distribution is service orientation, which simply means that the entire system is divided into different services and these services are placed on different servers to reduce the pressure on individual services and improve concurrency and performance. For example, the e-commerce system can simply split the order system, commodity system, login system and so on, deployed on different machines. If a service has a large number of visits, it can also be deployed on multiple machines at the same time.

Why distributed?

From a development point of view, the code of monolithic applications is concentrated together, while the code of distributed systems is split up according to the business. Each team is responsible for the development of one service, which improves development efficiency. In addition, the code is easy to maintain and extend when broken down by business.

Splitting the system into distributed systems not only facilitates the maintenance and expansion of the system, but also improves the performance of the entire system. Does splitting the entire system into different services and deploying each service on a single server significantly improve performance?