All Products
Search
Document Center

Alibaba Cloud Service Mesh:Verify zone-aware routing on an ASM instance topology

Last Updated:Mar 11, 2026

In multi-zone deployments, cross-zone traffic adds latency and data transfer costs. Zone-aware routing directs traffic to service endpoints in the same zone as the caller. When a same-zone endpoint becomes unavailable, traffic automatically fails over to endpoints in other zones.

This tutorial uses the Bookinfo sample application to demonstrate both behaviors on the ASM topology:

  • Same-zone preference: Traffic from productpage routes to reviews-v1 in the same zone.

  • Cross-zone failover: When reviews-v1 becomes unavailable, traffic shifts to reviews-v2 in a different zone.

Prerequisites

Before you begin, make sure that you have:

Step 1: Deploy the sample application

  1. Download the Helm chart for the sample application.

  2. Extract the package and open the asm-az-routing directory. In values.yaml, set the zones where the application deploys:

    zone1: cn-hangzhou-j
    zone2: cn-hangzhou-k

    This deploys reviews-v1 in cn-hangzhou-j and reviews-v2 in cn-hangzhou-k.

  3. Install the chart:

    helm install --namespace azdemo azdemo ./
  4. After all pods are running, send continuous requests through the ingress gateway:

    while true; do
      curl -I http://<ingress-gateway-ip>/productpage
      echo; sleep 1
    done

    Replace <ingress-gateway-ip> with the IP address of your ingress gateway. Press Ctrl+C to stop.

Step 2: Confirm same-zone routing on the topology

  1. Log on to the ASM console. In the left-side navigation pane, choose Service Mesh > Mesh Management.

  2. Click the name of the ASM instance. In the left-side navigation pane, choose Observability Management Center > Mesh Topology.

  3. Click Copy token and open in new window.

  4. On the logon page, enter the token and click log in.

  5. Select the namespace of the ASM instance. From the Display drop-down list, select Traffic Distribution, Traffic Rate, and Traffic Animation. Deselect Service Nodes.

    The topology shows traffic flowing from productpage-v1 to reviews-v1 in the same zone, confirming that zone-aware routing is active.

    Topology example 1

Step 3: Verify cross-zone failover

Simulate a zone failure by scaling reviews-v1 to zero pods, then observe the traffic shift.

  1. In the ACK console, navigate to Clusters and click the cluster name. Choose Workloads > Deployments.

  2. Find the reviews-v1 deployment, click Scale in the Actions column, set Desired Number of Pods to 0, and click OK.

  3. Return to the Mesh Topology page opened in Step 2.

    The topology now shows productpage-v1 routing to reviews-v2. This confirms cross-zone failover: when the same-zone reviews service is unavailable, traffic automatically routes to the reviews service in another zone.

    Topology example 2

Step 4: Verify routing recovery

Restore reviews-v1 and confirm that traffic returns to the same-zone endpoint.

  1. In the ACK console, navigate to Workloads > Deployments for the same cluster.

  2. Find the reviews-v1 deployment, click Scale in the Actions column, set Desired Number of Pods to 1, and click OK.

  3. Return to the Mesh Topology page opened in Step 2.

    The topology shows productpage-v1 routing back to reviews-v1 in the same zone, confirming that zone-aware routing recovers after the endpoint is restored.

    Topology example 3