Registry synchronization

更新时间:
复制 MD 格式

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

  1. Log on to the MSHA console.

  2. In the left-side navigation pane, choose Multi-active Instances to go to the Multi-active Instances list page.

  3. Select the target multi-active instance to go to its details page.

  4. In the left-side navigation pane, choose Service Layer Configuration and then Registry Synchronization Configuration.

  5. On the Registry Synchronization Configuration page, click Add Synchronization Task.

    • Add a Nacos-to-Nacos synchronization task

      1. 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.

        Important

        For 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 (,).

        Note

        When 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.

      2. After you complete the configuration, click OK.

    • Add a ZooKeeper-to-ZooKeeper synchronization task

      Note

      Currently, synchronization between ZooKeeper instances supports only Dubbo services.

      1. 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.

        Note

        The 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.

        Note

        The 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.

          Note

          The console does not currently support listing all service names from a ZooKeeper source registry.

      2. 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.

    Note

    Pausing 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.

    Important

    To 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.