By Hua Zhongming, Apache Dubbo Committer
Dubbo is a microservice framework. Dubbo SDK is bound to the same process as application services. It follows that application services are deployed in various locations of distributed clusters. To implement collaboration among various application services in a distributed environment, Dubbo defines several centralized components, including:
The figure describes the interaction process between Dubbo microservice components and each center.
However, the preceding three centers are not necessary conditions for running Dubbo. Users can decide not to enable them, or only enable one or more of them according to their business conditions to achieve the purpose of simplifying deployment. Typically, all users develop the Dubbo service with an independent registry, while configuration centers and metadata centers are introduced as needed during the evolution of microservices.
The registry center plays an important role, carrying the responsibilities of service registration and service discovery. Currently, Dubbo supports service discovery and registration at the following two granularities, namely, the interface level and the application level. The registry can be deployed as needed:
The registry does not rely on configuration center and metadata centers, as shown in the following figure:
In this figure, no configuration center and metadata center are deployed. In Dubbo, the instance of the registry is used as the configuration center and metadata center by default. This is the default behavior of Dubbo. If you do not need the configuration center or metadata center, you can disable it in the configuration. In the configuration of the registry, there are two configurations: use-as-config-center and use-as-metadata-center. Just set the configuration to false.
Metadata centers are supported in 2.7.x. As application-level service registration and discovery are implemented in Dubbo, metadata centers become important. Metadata center deployment will be required in several situations.
If you have both requirements, you can deploy a metadata center and use Dubbo configurations to integrate the metadata center.
The metadata center does not depend on the registry and configuration center. Users can choose whether to integrate or deploy the metadata center, as shown in the following figure:
The figure is not equipped with a configuration center, which means that the ability to manage configurations globally is not required. The figure does not have a registry center, which means that the Dubbo mesh scheme may be adopted, service registration may not be required, and only service calls in direct connection mode may be received.
The configuration center is different from the other two centers. It has nothing to do with interface or application level. It has no corresponding relationship with the interface. It is related to configuration data. Although there is no registry and metadata center deployed, the configuration center can be directly connected to Dubbo application services. In the entire deployment architecture, instances in the entire cluster (whether providers or consumers) will share the configurations in the configuration center cluster, as shown in the following figure:
The figure does not have a registry center, which means that the Dubbo mesh scheme may be adopted, service registration may not be required, and only service calls in direct connection mode may be received.
The figure is not equipped with a metadata center, which means that the consumer can obtain service metadata from the metadata service exposed by the Provider to implement RPC calls.
Although the three centers above are no longer necessary for Dubbo application services, in a real production environment, once the three centers have been integrated and deployed, the three centers still face availability problems. Dubbo needs to support the high availability solutions of the three centers. Dubbo supports multi-registry, multi-data centers, and multi-configuration centers to meet the requirements of deployment architecture modes such as active zone-redundancy, three data centers across two zones, and active geo-redundancy.
The Dubbo SDK supports multiple modes for all three centers.
Take the registry as an example. The following is a schematic diagram of the deployment architecture for a multi-active scenario:
Sealer – A Kubernetes-based Distributed Application Package & Delivery Tool
AppActive: An Open-Source Multi-Active Disaster Tolerance Architecture
506 posts | 48 followers
FollowAlibaba Clouder - December 22, 2020
Alibaba Clouder - October 9, 2020
Alibaba Cloud Native Community - August 23, 2023
Alibaba Clouder - November 7, 2019
Alibaba Cloud Native Community - September 13, 2023
Alibaba Cloud Native Community - March 3, 2022
506 posts | 48 followers
FollowMSE provides a fully managed registration and configuration center, and gateway and microservices governance capabilities.
Learn MoreCustomized infrastructure to ensure high availability, scalability and high-performance
Learn MoreEMAS HTTPDNS is a domain name resolution service for mobile clients. It features anti-hijacking, high accuracy, and low latency.
Learn MoreApplication High Available Service is a SaaS-based service that helps you improve the availability of your applications.
Learn MoreMore Posts by Alibaba Cloud Native Community