Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the migration method for Dubbo multiple registries and Zookeeper services

Shulou Source: shulou.com Published: 2022-06-01 12:11:41 11月15日 Update

This article introduces the relevant knowledge of "what is the migration method of Dubbo multi-registry and Zookeeper services". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. Dubbo multiple registries

1. Application scenarios

For example, some Alibaba services are too late to deploy in Qingdao, only in Hangzhou, while other applications in Qingdao need to refer to this service to register with two registries at the same time.

Consumer.xml

2. Different services use different registries

For example: some CRM services are specially designed for international stations, while some services are specially designed for Chinese stations.

Consumer.xml

3. Multiple registry references

For example, CRM needs to call the PC2 service of both Chinese and international stations. PC2 is deployed in both Chinese and international stations, with the same interface and version number, but not the same database.

Consumer.xml

If consumer.xml only needs to connect two different registries temporarily in the test environment, use a vertical sign to separate multiple different registry addresses:

II. Service migration of Dubbo multiple registries

1. As the name implies, move services from one place to another, for example, from A to B.

2. How to realize the service migration of multiple registries

Step one

Add the address of the registry in B, which is split between the registries of AB and AB in English, (zk nodes in the same service cluster are separated by commas)

For example: dubbo.registry.address=192.168.220.128:2181 | 192.168.221.129 2181192.168.221.130 2181192.168.221.131purl 2181 this is the configuration of the two registries

Step two

Jenkins rebuilds the service, and the zk1 itself contains all the services, and now the build is to deploy the service to the zk2 cluster. In this way, it can be realized that the two sets of registries of zk in An and zk in B enjoy the same set of services.

Step three

Build all the consumer end of the service

Step 4

First cancel the service that the service consumer invokes zk1, and the specific implementation is to remove the configuration of the first zk, and then build the consumer

Step 5

Unconfigure the service provider as well; then rebuild the service provider. This completes the migration of all services from zk1 to zk2 and removes all services from zk1.

This is the end of the content of "what is the migration method of Dubbo multi-registry and Zookeeper services". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Services steps different two Chinese station international that is Chinese consumption configuration method content at the same time location address provider more consumer knowledge cluster Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn OPPO Reno Microsoft Redmi Xiaomi