All Products
Search
Document Center

Microservices Engine:CLB-based migration

Last Updated:Jul 30, 2025

Microservices Engine (MSE) cloud-native gateways provide a Classic Load Balancer (CLB) migration feature that lets you gradually migrate traffic from a source gateway to an MSE cloud-native gateway.

Prerequisites

  • An MSE cloud-native gateway of version 1.2.3 or later is created.

  • Routing rules are configured for the MSE cloud-native gateway. The routing rules must cover all routing scenarios of the source gateway. For more information, see Create a routing rule.

Note

The Server Load Balancer (SLB) migration feature supports only Classic Load Balancer (CLB) instances. This feature does not support Application Load Balancer (ALB) or Network Load Balancer (NLB) instances. For more information about the differences between the three types of SLB instances, see Product overview.

Background information

The SLB migration procedure consists of three phases: before, during, and after the migration. The following figure shows the procedure.

  • Before the migration: In a typical request flow, a client uses DNS to access the server. DNS returns the IP address of the corresponding Layer 4 Internet-facing SLB instance to the client. The client then sends a request to the IP address of the SLB instance. The SLB instance forwards the request to the user's Layer 7 business gateway. The business gateway performs operations, such as authentication, and then forwards the request to the server.

  • During the migration: The nodes of the MSE cloud-native gateway are attached to the specified vServer group of the SLB instance, and a total weight is set for the newly attached nodes. For example, if you set the total weight to 10% and change the scheduling algorithm of the SLB instance to weighted round-robin, the SLB instance distributes 10% of the client traffic to the MSE cloud-native gateway based on the weight. You can gradually adjust the total weight of the nodes to control the traffic migration ratio.

    Note

    Weighted round-robin is a scheduling algorithm where the gateway distributes requests to upstream servers based on their configured weights. This allows servers to handle traffic according to their capacity. Backend servers with higher weights receive more requests.

  • After the migration: When you adjust the total weight of the MSE cloud-native gateway nodes to 100%, all traffic to the SLB instance is forwarded to the MSE cloud-native gateway. This completes the migration.

Step 1: Add a CLB migration configuration

  1. Log on to the MSE console.

  2. In the left-side navigation pane, choose Cloud-native Gateway > Gateways. In the top navigation bar, select a region.

  3. On the Gateways page, click the ID of the gateway.

  4. On the Overview page, click the Access Point tab. Then, on the Gateway Ingress page, click Migrate CLB in the upper-right corner.

  5. In the Migrate CLB panel, set the parameters and click OK.

    Configuration item

    Description

    Network Type

    Select a network type based on the IP address of the CLB instance that you want to migrate. Valid values: Internet and VPC.

    CLB Instance

    Select the CLB instance that you want to migrate.

    Listener Port And Backend Server

    Click Add, and select CLB Listener Port and Gateway Protocol. After the selection, the corresponding vServer group is displayed.

    Note

    You must select at least one server group. You can also add both HTTP and HTTPS server groups.

    Weight

    The total weight of the current gateway nodes that are added to the vServer group of the CLB instance to be migrated. We recommend that you first set the initial weight to 0 and enable the migration after the CLB configuration is adjusted.

    • A weight of 0 indicates that no traffic is routed to the current gateway. We recommend that you set this parameter to 0 for the initial configuration and change it to a non-zero value after you modify the scheduling algorithm of the CLB instance.

    • A weight of 100 indicates that all traffic is migrated to the current gateway. In this case, you must manually set the weight of non-current gateway nodes in the vServer group to 0. Otherwise, not all traffic is routed to the current gateway.

    For example, a gateway has two nodes and the weight is set to 20. After the gateway nodes are added to the vServer group of the CLB instance to be migrated, the total weight of the two gateway nodes is 20, which means the weight of each node is 10. You need to adjust the weights of the nodes in the vServer group to ensure that the total weight is 100. Otherwise, the traffic migration ratio does not match the weight.

    Note
    • After you set the weight, you must change the scheduling algorithm of the CLB instance to be migrated to weighted round-robin. Otherwise, the weight setting does not take effect.

    • The weight that you set here affects only the newly added gateway nodes. The weights of existing nodes in the vServer group are not affected.

  6. On the Gateway Ingress tab, click Monitor in the Actions column for the target SLB instance to open the Instance Management page in the Server Load Balancer (SLB) console.

  7. On the Instance Management page, click the Listener tab. Find the listener that you want to modify and click Modify Listener Configuration in the Actions column.

  8. On the Configure Listener page, click Modify to the right of Advanced Configuration. Set Scheduling Algorithm to Weighted Round-robin (WRR) and click Next. You can configure the Backend Server and Health Check as needed.

  9. Click Submit to set the scheduling algorithm for the CLB instance to weighted round-robin.

    Click the target listener. In the Listener Details panel, you can see that the Scheduling Algorithm is set to Weighted Round-robin.

Step 2: Control the traffic migration ratio

You can adjust the weight of the CLB migration to control the traffic migration ratio.

  1. Log on to the MSE console.

  2. In the left-side navigation pane, choose Cloud-native Gateway > Gateways. In the top navigation bar, select a region.

  3. On the Gateways page, click the ID of the gateway.

  4. On the Gateway Ingress tab, click Migrate CLB to open the Migrate CLB panel. Then, set the Weight value.

    We recommend that you first perform a migration validation with a small amount of traffic and then gradually increase the traffic ratio to 100. If an unexpected error occurs during the migration, you can stop the migration by setting the weight to 0.

  5. In the left navigation pane, choose Observation Analysis > Business Monitoring. On the Global Dashboard tab, you can view the traffic status.

(Optional) Step 3: Detach the CLB instance

  1. Log on to the MSE console.

  2. In the left-side navigation pane, choose Cloud-native Gateway > Gateways. In the top navigation bar, select a region.

  3. On the Gateways page, click the ID of the gateway.

  4. On the Gateway Ingress tab, find the target CLB instance and click Detach in the Actions column. In the detach dialog box, click OK.

    Note
    • After the CLB instance is detached, traffic is no longer routed to the gateway.

    • If you want to stop routing traffic to the gateway but retain the CLB migration configuration, you can set Weight to 0 on the Migrate CLB page.