All Products
Search
Document Center

Serverless App Engine:Migrate from a CLB Ingress to an ALB Ingress

Last Updated:Apr 01, 2026

Migrating your SAE gateway from a Classic Load Balancer (CLB) Ingress to an Application Load Balancer (ALB) Ingress gives you better stability, performance, and access to advanced routing features. This guide walks through a zero-downtime migration using weighted DNS to shift traffic gradually.

Prerequisites

Before you begin, ensure that you have:

  • An existing CLB Ingress in SAE with at least one custom forwarding rule

  • Access to SAE Gateway Routes

  • Access to Alibaba Cloud DNS Authoritative DNS for the domain in the CLB Ingress forwarding rules

  • (For public Ingresses) Administrator access on a local machine to edit the hosts file

Step 1: Create an ALB Ingress

Create the gateway route

  1. Go to SAE Gateway Routes. Select the region and namespace of your existing CLB Ingress, then click Create Gateway Route.

  2. Configure the new gateway route to match your CLB Ingress:

    ParameterValue
    Route nameA custom name for the new route
    Gateway typeApplication Load Balancer (ALB)
    ALB instanceSelect an existing ALB instance or create a new one
    Network typeSame as the original CLB Ingress
    Frontend protocol typeSame as the original CLB Ingress. If you select HTTPS, also configure an SSL certificate.
    Access portSame as the original CLB Ingress
    Custom forwarding ruleMirror each rule from the original CLB Ingress, including Domain name, Path, Backend application, Container port, and Rewrite policy
    Default forwarding ruleSame as the original CLB Ingress
  3. Click Save and wait for the ALB Ingress to be created.

Collect ALB instance details

After the ALB Ingress is created, collect the following information—you'll need it in later steps.

  1. In the gateway route list, click the Gateway instance link for the new ALB Ingress to open the instance details page.

  2. On the Instance details tab, record:

    • The DNS name from the Basic information section

    • All Elastic IP Addresses (EIPs) from the Zones section

  3. Return to the gateway route list. In the Actions column for the new ALB Ingress, click Edit. For each custom forwarding rule, record the Frontend protocol type, Access port, and Path.

Verify the ALB Ingress (public Ingresses only)

Before shifting any DNS traffic, verify that the ALB Ingress routes requests correctly by testing it through your local hosts file.

Windows

  1. Add the following line to C:\Windows\System32\drivers\etc\hosts, then save the file. Replace <public_ip> with any EIP of the ALB instance and <domain_name> with the domain name from a custom forwarding rule.

    <public_ip> <domain_name>
  2. Confirm the entry is active by running the following command. The output should include an EIP of the ALB instance. If it does not, restart your machine and try again.

    ping <domain_name>

macOS/Linux

  1. Add the following line to /etc/hosts, then save the file. Replace <public_ip> with any EIP of the ALB instance and <domain_name> with the domain name from a custom forwarding rule.

    <public_ip> <domain_name>
  2. Confirm the entry is active:

    ping <domain_name>

    The output should include an EIP of the ALB instance. If it does not, restart your machine and try again.

Verify routing in a browser

Open a browser and access each custom forwarding rule using the URL format <Frontend protocol type>://<Domain name>:<Access port><Path>. For example: http://xx.xx.xx:80/test. Confirm each URL returns the expected response.

Step 2: Shift DNS traffic to the ALB Ingress

Migrate traffic in three phases: add ALB EIPs to the DNS record, gradually increase the ALB weight until all traffic is on ALB, then switch to a CNAME record pointing to the ALB DNS name.

DNS record changes take effect after the TTL expires. Allow time for each weight change to propagate. If traffic does not shift as expected immediately after a change, wait for the TTL to expire before concluding there is a configuration issue.

Add ALB EIPs to the DNS record

  1. Go to Authoritative DNS. In the Actions column for your domain, click Configure.

  2. On the Configure tab, find the DNS record for the original CLB Ingress. In the Actions column, choose Modify > Modify record set.

  3. In the Record value set section, click Add entry for each EIP of the ALB instance and set the Record value to the corresponding EIP.

  4. Set Record value load policy to Weight. As a starting point, set the Weight of each ALB EIP record to 1 and the Weight of the CLB instance record to 98. This routes approximately 1% of traffic per ALB EIP to the new gateway while leaving the majority on CLB.

  5. Click OK and wait for the DNS changes to propagate.

Gradually increase ALB traffic

Monitor your services. If the ALB Ingress is operating correctly, progressively lower the CLB record weight and raise the ALB EIP weights—keeping all ALB EIP records at the same weight. Continue until the CLB weight reaches 0, then delete the CLB record.

Tip: If you see issues at any stage, increase the CLB weight and decrease the ALB weights to route traffic back to CLB while you investigate.

Switch to a CNAME record

Once all traffic is on the ALB Ingress:

  1. Delete all but one of the ALB EIP records.

  2. In the Actions column for the remaining record, click Modify. Change Record type to CNAME and set Record value to the DNS name of the ALB instance.

  3. Click OK and wait for the change to propagate.

Step 3: Delete the original CLB instance and CLB Ingress

Proceed only after confirming both of the following:

  • All DNS traffic has moved to the ALB Ingress (the CLB record weight is 0 and deleted)

  • Your services are running without issues on the ALB Ingress (verify through monitoring)

Release the CLB instance: Go to SAE Gateway Routes. Select the original region and namespace. Click the Gateway instance link for the original CLB gateway route to open the instance details page. In the upper-right corner, choose More > Release and follow the on-screen instructions.

Delete the CLB Ingress: In the gateway route list, find the original CLB gateway route. In the Actions column, click Delete and follow the on-screen instructions.