“This is the 11th day of my participation in the First Challenge 2022. For details: First Challenge 2022.”
Dubbo3’s series of microservices frameworks
🏆 [Alibaba Micro-service Technology Series] “Dubbo3.0 Technology Topics” general technical system introduction and technical guide (directory)
This series is a brief introduction to Dubbo, covering the core concepts, basic usage, and core functions of Dubbo3.
Basic introduction to Dubbo
- Apache Dubbo is a microservices development framework that provides two key capabilities: RPC communication and microservices governance. The micro-services developed by Dubbo will have the ability of remote discovery and communication between each other. Meanwhile, the rich service governance capabilities provided by Dubbo can realize service governance demands such as service discovery, load balancing and traffic scheduling. Dubbo is also highly extensible, allowing users to customize their implementation at almost any function point to change the framework’s default behavior to suit their business needs.
Dubbo3 upgrade development
-
Dubbo3 is based on Dubbo2. While maintaining the original core functions and features, Dubbo3 has been fully upgraded in terms of ease of use, ultra-large scale micro-service practices, and cloud native infrastructure adaptation. The following documents are based on Dubbo3.
-
Dubbo provides a one-stop solution for the construction of cloud native micro-service business. It can use Dubbo to quickly define and release micro-service components, and build various service governance capabilities required for the operation and maintenance of the entire micro-service system based on Dubbo’s rich out-of-the-box features and super expansion capabilities. Such as Tracing, Transaction, etc
Basic capabilities provided by Dubbo3 include:
- Service discovery
- Current communication
- Load balancing
- Traffic management
Dubbo3 language level range
- Dubbo plans to provide a rich multi-language client implementation, of which the Java and Golang versions are currently the most stable and active, and other multi-language clients [] are under continuous construction.
- Dubbo3 is the next generation product standing on the shoulders of giants. It draws on the advantages of the previous generation and makes a lot of optimization for known problems. Therefore, Dubbo has incomparable advantages in solving business implementation and large-scale practice
Out of the box
- Ease of use, such as the Java version of the interface – oriented proxy feature to achieve local transparent calls
- Feature rich, based on native libraries or lightweight extensions can achieve the vast majority of microservice governance capabilities
- Super – scale micro – service cluster practice
- High-performance cross-process communication protocol
- Address discovery, traffic management, easily support millions of cluster instances
Enterprise-level microservice governance capabilities
Dubbo3 was born in the background of cloud native. The microservices constructed with Dubbo follow the idea of cloud native, and can better reuse the underlying cloud native infrastructure and fit into the cloud native microservice architecture. This is reflected in:
- The service can be deployed on the container and Kubernetes platform, and the service life cycle can be aligned with the platform scheduling cycle.
- It supports classic Service Mesh microservice architecture and introduces Proxyless Mesh architecture to further simplify Mesh landing and migration costs and provide more flexible choices.
- As a bridge layer, Dubbo supports interoperability with heterogeneous microservice systems such as SpringCloud and gRPC
One-stop micro service solution
-
Dubbo provides almost all service governance capabilities, from service definition, service discovery, service communication to traffic control, and tries to provide better ease of use by shielding users from low-level details.
-
Defining services in Dubbo is simple and straightforward, with the option of using a language-binding approach (for example, Interface can be defined directly in Java) or using Protobuf IDL language neutral. Either way, from the perspective of the service consumer, you can code directly through the transparent proxy provided by Dubbo.
-
In Dubbo, when we refer to services, we usually refer to rPC-grained interfaces or methods that provide the ability to add, subtract, or modify a particular business, as opposed to the general concept of services in some microservices concept books.
Point-to-point service communication is another basic capability provided by Dubbo, which sends Request data (Request data) to the back-end service in an RPC manner and receives the calculation result (Response) returned by the server.
RPC communication is completely transparent to the user. The user does not need to care about how or where the request is sent, and only needs to get the correct call result for each call. Synchronous request-Response is the default communication model, which is the simplest but does not cover all scenarios. Therefore, Dubbo provides a richer communication model:
- Client Side Asynchronous request-Response
- Server Side Asynchronous request-Response
- Request Streaming
- Response Streaming
- Bidirectional Streaming
Dubbo’s service discovery mechanism enables the micro-service components to evolve independently and deploy arbitrarily, and the consumer can communicate without being aware of the deployment location and IP address of the peer. Dubbo provides a client-based service discovery mechanism. Users can enable service discovery in a variety of ways:
Use separate registry components such as Nacos, Zookeeper, Consul, Etcd, etc. Handing over the organization and registration of services to underlying container platforms such as Kubernetes is understood to be a more cloud-native approach to transparent address discovery so that Dubbo requests can be sent to any IP instance, with traffic randomly allocated in the process. Dubbo’s traffic control policies can be used to implement more diversified and fine-grained traffic control. Dubbo provides policies such as load balancing, traffic routing, request timeout, traffic degradation, and retry. Based on these basic capabilities, more scenario-based routing schemes can be easily implemented. Including Canary publishing, A/B testing, weighted routing, same zone priority, and more, Dubbo supports dynamic implementation of flow control policies in runtime, requiring no redeployment.
Dubbo’s strong service governance capabilities are not only reflected in the core framework, but also in its excellent scalability and supporting facilities around it. By defining extension points such as Filter, Router, and Protocol on almost every key process, we can enrich the functions of Dubbo or achieve interconnection with other micro-service supporting systems. There are currently implementations of SPI extensions, including Transaction and Tracing. For details about Dubbo extensibility, see the Apache/Dubbo-spI-Extensions project.
Cloud friendly
Dubbo is designed in accordance with the concept of cloud native microservices development, which is reflected in many aspects. The first is the support of cloud native infrastructure and deployment architecture, including Kubernetes, Service Mesh, etc
- Many of Dubbo’s core components have been upgraded to cloud native, including Triple protocol, unified routing rules, and multilingual support. It is worth mentioning that how to use Dubbo to support elastic scaling services such as Serverless is also in the future plan, including the use of Native Image to improve Dubbo startup speed and resource consumption.
The cloud native features of Dubbo are described in the following two aspects
Container Scheduling Platform (Kubernetes)
- Service Mesh
- Kubernetes
Dubbo microservices support Kubernetes platform scheduling, the most basic is to achieve Dubbo service life cycle and container life cycle alignment, including Dubbo startup, destruction, service registration and other life cycle events. Compared with the past, Dubbo defined life cycle events by itself and required developers to comply with conventions in operation and maintenance practices, Kubernetes infrastructure defined strict component life cycle events (Probes), which in turn required Dubbo to adapt according to conventions.
Kubernetes Service is another level of adaptation, reflecting the trend of Service definition and registration moving down to the cloud native underlying infrastructure. In this mode, users no longer need to set up additional registry components, Dubbo consumer nodes can automatically connect to Kubernetes (API-Server or DNS), Kubernetes endPoints by Service Name (Kubernetes Service Name) The Service is defined through the standard Kubernetes Service API and is scheduled to each node.
Service Mesh
Service Mesh is widely recognized in the industry as the next generation of microservices architecture, mainly because it solves many difficult problems, including transparent upgrades, multilingualism, dependency conflicts, and traffic governance. The typical architecture of Service Mesh is to deploy an independent Sidecar component to intercept all egress and inlet traffic and integrate rich traffic governance policies, such as load balancing and routing, into the Sidecar. In addition, The Service Mesh also needs a Control Plane to manage and Control Sidecar traffic, that is, deliver various policies. We refer to this architecture here as the classic Mesh.