NacosSync multi-cluster migration

NacosSync migration

Environment introduction

80 is computer room A, 175 is computer room B

Assuming that all services are connected to the cluster in computer room B 175, the data in computer room B is now synchronized to the cluster 80 in computer room A

Currently supported synchronization types:

  • Synchronize Nacos data to Nacos
  • Zookeeper data synchronization to Nacos
  • Nacos data is synchronized to Zookeeper
  • Eureka data synchronization to Nacos
  • Consul data synchronization to Nacos

Nacos cluster deployed in computer room A

image3.png


Nacos cluster deployed in computer room B

image4.png

Add registry cluster information

Log in to the NacosSync console http://xx.xx.xx.xx:8081/#/clusterConfig

1. Click the "Cluster Configuration" button in the left navigation bar to add a new cluster, first add a nacos cluster, select the cluster type as "NACOS" and add the IP: port of each node in the cluster to the cluster IP list

image.png

Note: The cluster name can be customized, but once confirmed, it cannot be modified. Otherwise, based on the tasks added to the cluster, the NacosSync will not resume successfully after restarting.

2. After adding, you can find in the list:

image5.png

Add synchronization task

1. Add a synchronization task to synchronize from Nacos cluster to Nacos cluster. The granularity of synchronization is service. Nacos B cluster is called source cluster, and Nacos A cluster is called target cluster.

image.png

2. After the addition is complete, you can view the added synchronization tasks in the service synchronization list:

image.png

3. After the synchronization is completed, check whether the data has been successfully synchronized to the Nacos cluster. You can query through the Nacos console and log in to the 80 A cluster console to view

image8.png

The data has been successfully synchronized from the Nacos of the B cluster to the Nacos of the A cluster

Precautions

  • After the synchronization task is added, you need to ensure that the service is successfully synchronized to the target cluster, which can be queried through the console of the target cluster.
  • NacosSync supports high-availability cluster mode deployment, you only need to configure the same database.
  • If you are not clear about the subscription and publishing services, it is recommended to synchronize the services in both directions.
  • Dubbo client does not currently support Nacos' weight function. If you use the weight function, you need to reconsider whether the solution is appropriate.


Guess you like

Origin blog.51cto.com/536410/2592125