This topic describes how to configure a registry synchronization task.
Prerequisites
You have configured a registry synchronization cluster. For more information, see Registry synchronization cluster.
Procedure
Log on to the MSHA console.
In the left-side navigation pane, choose Multi-active Instances to go to the Multi-active Instances list page.
Select the target multi-active instance to go to its details page.
In the left-side navigation pane, choose Service Layer Configuration and then Registry Synchronization Configuration.
On the Registry Synchronization Configuration page, click Add Synchronization Task.
Add a Nacos-to-Nacos synchronization task
On the Add Synchronization Task page, specify the following parameters:
Parameter
Description
Synchronization cluster
Select an existing synchronization cluster. For more information, see Registry synchronization cluster.
Source registry
Select an existing registry as the source registry. For more information, see Registry synchronization cluster.
Destination registry
Select an existing registry as the destination registry. For more information, see Registry synchronization cluster.
Namespace
Enter the Nacos namespace ID. For more information, see Create a namespace.
If you leave this parameter empty, the default value is public.
ImportantFor Nacos synchronization, the namespace IDs of the source and destination registries must be the same. Nacos 1.2 and later versions support custom namespace IDs.
Group name
Enter the Nacos group name.
If you leave this parameter empty, the default value is DEFAULT_GROUP.
Service name
The service name you enter must match the one in the registry.
You can enter multiple service names to be synchronized, separated by commas (,).
NoteWhen Nacos is the source registry, you can view all service names under the specified namespace and group name. You can also click Select Service Name and select one or more services on the Select Service Name page.
After you complete the configuration, click OK.
Add a ZooKeeper-to-ZooKeeper synchronization task
NoteCurrently, synchronization between ZooKeeper instances supports only Dubbo services.
On the Add Synchronization Task page, specify the following parameters:
Parameter
Description
Synchronization cluster
Select an existing synchronization cluster. For more information, see Registry synchronization cluster.
Source registry
Select an existing registry as the source registry. For more information, see Registry synchronization cluster.
Destination registry
Select an existing registry as the destination registry. For more information, see Registry synchronization cluster.
Group name
Enter the ZooKeeper group name.
NoteThe group name maps to the group field of a Dubbo service. If you leave this parameter empty, no group filter is applied.
Version
Enter the ZooKeeper version.
NoteThe version maps to the version field of a Dubbo service. If you leave this parameter empty, no version filter is applied.
Service name
The service name you enter must match the one in the registry.
You can enter multiple service names to be synchronized, separated by commas (,).
ZooKeeper-to-ZooKeeper synchronization tasks support full synchronization. If you enter an asterisk (*), all services under the specified group and version are synchronized.
NoteThe console does not currently support listing all service names from a ZooKeeper source registry.
After you complete the configuration, click Confirm.
Batch task creation
When you enter multiple services at once, the MSHA console creates the tasks asynchronously. The task Status is Creating Synchronization Task.
A Status of Syncing indicates the service is synchronized from the source registry to the destination registry.
After you configure the registry synchronization tasks, you can perform the following operations on the Registry Synchronization Configuration page:
Pause a synchronization task: Select a task with a Status of Running and click Pause. The service synchronization stops, and the service is deregistered from the destination registry. The operation is complete once the task's Status changes to Paused.
NotePausing and deleting a task both stop service synchronization. However, deleting a task also removes its information from the MSHA console and RDS. To avoid re-entering this information, pause the task instead of deleting it unless it must be permanently removed.
Resume a synchronization task: Select a task with a Status of Paused and click Resync. The Status changes to Syncing, and service synchronization from the source registry to the destination registry resumes.
Delete a synchronization task: Select the task that you want to delete and click Delete. In the Confirm Delete Synchronization Task dialog box, click OK. The service synchronization stops, and the task is removed from the page.
ImportantTo safely batch delete tasks, first pause them, and then delete the paused tasks.
Retry a synchronization task: Select a task with a Status of Task Creation Failed or Creation Timed Out and click Retry to create the task again. If the operation continues to fail after multiple retries, verify that the ECS instance is passing its health checks.
Batch operations: You can select multiple tasks to perform batch pause, resync, or delete operations. Batch operations are performed asynchronously, and it may take some time for all operations to complete.