MSE Sync enables smooth data migration from a self-managed Nacos registry to MSE Nacos with minimal impact on production services. MSE Nacos offers higher performance and capacity, more service discovery protocols, simplified O&M, and flexible scaling compared to a self-managed registry.
Prerequisites
Limitations
A failure in the migration tool can interrupt data synchronization. For high availability, deploy the tool on at least two nodes and complete the migration as quickly as possible after it starts.
Ensure network connectivity between your self-managed Nacos, the migration tool, and MSE Nacos.
Use Nacos 2.x clients. If you use Nacos 1.x clients, upgrade your MSE Nacos instance to a higher specification.
Procedure
The following diagram shows the deployment architecture for the migration.
Step 1: Configure the synchronization task
In the left navigation bar of the migration tool, click Cluster configuration, and then click New Cluster. In the New Cluster dialog box, add the source Nacos cluster information and click OK.
Parameter
Description
Cluster Name
A custom name for the cluster.
Cluster type
NACOS.
Namespace ID
The namespace ID of the services to be synchronized.
Username
If Nacos authentication is enabled, enter the corresponding username and password.
Password
AccessKey ID
Your AccessKey ID.
AccessKey secret
Your AccessKey secret.
Connect IP
Enter the IP address and port for each Nacos node, one per line. The default port is 8848.
If the source cluster uses SLB for load balancing, enter the SLB IP address and port in the Connect IP field.
Click New Cluster again, and add the destination Nacos cluster information.
Parameter
Description
Cluster Name
A custom name for the cluster.
Cluster type
NACOS.
Namespace ID
The namespace ID of the services to be synchronized.
Username
If Nacos authentication is enabled, enter the corresponding username and password.
Password
AccessKey ID
Your AccessKey ID.
AccessKey secret
Your AccessKey secret.
Connect IP
The endpoint of the destination MSE Nacos instance. For example, mse-8b7de****-p.zk.mse.aliyuncs.com:8848.
In the left navigation bar, click Sync Task, and then click New Task to add the Dubbo service that you want to migrate.
Sync Method: Select Bidirectional Synchronization. This means that if a change is made to the synchronized service on either side, the change is synchronized to the other side.
Synchronization Type: Select Service Information. MSE Sync automatically lists all services from the source cluster, and you can select them as needed.
Click OK.
On the Sync Service page of the migration tool, view the names of the synchronized services.
Step 2: Verify the synchronization
-
Log on to the MSE console, and select a region in the top navigation bar.
-
In the left-side navigation pane, choose Microservices Registry > Instances.
-
On the Instances page, click the name of the instance.
In the left navigation bar, click Service Management > Services to check whether the services have been synchronized.
Step 3: Migrate the Dubbo clients
Modify the endpoint in the Dubbo clients.
In the XML configuration file of your Dubbo client, replace the self-managed Nacos endpoint in the
dubbo:registry addressattribute with the MSE Nacos instance endpoint.Before:
<dubbo:registry address="nacos://127.0.0.1:8848"/>After:
<dubbo:registry address="nacos://mse-********-p.nacos-ans.mse.aliyuncs.com:8848"/>Restart the clients. The Dubbo clients then connect to MSE Nacos.
NoteTo ensure business continuity, restart your clients in batches. After restarting each batch, verify that the clients disconnected from the self-managed registry and successfully registered with MSE Nacos.
Step 4: Decommission the self-managed Nacos cluster
Stop the self-managed Nacos cluster.
Stop the migration tool.