All Products
Search
Document Center

Alibaba Cloud Service Mesh:Configure a high-performance and high-availability ASM gateway

Last Updated:Sep 12, 2026

An Alibaba Cloud Service Mesh (ASM) gateway is a key component of Istio that manages ingress and egress traffic at the edge of your service mesh. In production, unoptimized gateways introduce latency at each network hop and become single points of failure during scaling events or regional outages. This topic explains how to optimize each segment of the traffic path -- from Domain Name System (DNS) resolution through load balancing to the gateway pods -- to reduce latency and eliminate downtime.

Traffic path and optimization targets

When you create an ASM gateway, ASM deploys an istio-ingressgateway Deployment in the istio-system namespace of your Container Service for Kubernetes (ACK) cluster. A Classic Load Balancer (CLB) instance is automatically associated with this Deployment, and the gateway pods serve as backend servers of the CLB instance.

ASM gateway components

A service request flows through each of these components:

Traffic path from client to service

Every segment of this path -- DNS resolution, load balancing, network forwarding, and Transport Layer Security (TLS) termination -- affects latency and availability. The sections below cover how to optimize each one.

Reduce latency

Deploy across multiple regions for nearby access

ASM manages ACK clusters in multiple regions, allowing clients to connect to the nearest cluster rather than routing requests across long distances. Intelligent DNS resolution maps each domain name to the IP address of the CLB instance closest to the client. This reduces round-trip time and distributes traffic geographically.

Cross-region load balancing is also supported. When one region becomes overloaded, traffic shifts to healthier regions automatically. For details, see Use ASM to implement cross-region disaster recovery and load balancing.

Select the Terway CNI plug-in for direct pod forwarding

The Container Network Interface (CNI) plug-in in your ACK cluster determines how the CLB instance forwards traffic to the gateway pods:

CNI plug-inTraffic pathLatency impact
Terway (recommended)CLB forwards traffic directly to gateway podsLower latency -- skips the extra hop through NodePort
FlannelCLB forwards to NodePort Service, then NodePort routes to gateway podsHigher latency -- adds an extra network hop

Use the Terway CNI plug-in for production workloads. Direct pod forwarding eliminates the overhead of NodePort-based routing. For a detailed comparison, see Terway and Flannel.

Scale with multiple CLB instances

When a single CLB instance cannot handle your gateway's traffic volume, associate multiple CLB instances with the same gateway. Each instance independently distributes traffic to the gateway pods, increasing total throughput.

See Access an ASM gateway by using multiple CLB instances.

Enable TLS acceleration

ASM gateways on the commercial edition support TLS acceleration powered by Intel Multi-Buffer technology. In benchmark tests, enabling this feature improved queries per second (QPS) by 80%.

Note: The 80% QPS improvement was measured in Alibaba Cloud internal benchmarks. Actual gains depend on your workload characteristics, certificate key sizes, and hardware configuration.

See Enable Multi-Buffer for TLS acceleration.

Eliminate downtime

Set up geo-disaster recovery

Deploy ACK clusters across multiple regions with active geo-redundancy. If an entire region goes offline, traffic automatically fails over to clusters in other regions. Combined with intelligent DNS resolution, this provides region-level disaster recovery without manual intervention.

See Use ASM to implement cross-region disaster recovery and load balancing.

Add CLB redundancy

Associate multiple CLB instances with a single ASM gateway so that if one instance fails, the others continue serving traffic. This eliminates the load balancer as a single point of failure.

See Access an ASM gateway by using multiple CLB instances.

Distribute gateway pods across nodes and zones

Spread gateway pods across different nodes and availability zones to guard against node-level or zone-level outages. Use pod anti-affinity rules and topology spread constraints to control placement.

The following example shows a topology spread constraint that distributes gateway pods evenly across availability zones:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: istio-ingressgateway
  namespace: istio-system
spec:
  template:
    spec:
      topologySpreadConstraints:
        - maxSkew: 1
          topologyKey: topology.kubernetes.io/zone
          whenUnsatisfiable: DoNotSchedule
          labelSelector:
            matchLabels:
              istio: ingressgateway
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 100
              podAffinityTerm:
                labelSelector:
                  matchLabels:
                    istio: ingressgateway
                topologyKey: kubernetes.io/hostname

For the full configuration procedure, see Improve availability for the ingress gateway service of an ASM instance.

Enable graceful shutdown for services

Configure a pre-stop hook on service pods to drain in-flight requests before the pod terminates. Without graceful shutdown, active requests fail or drop during scaling events and rolling updates.

See Configure the lifecycle of sidecar proxies.

Enable connection draining on the CLB instance

When the ASM gateway scales in or out, existing connections on the CLB instance must be retained for a configurable period to let in-flight requests complete. Enable connection draining on the CLB instance to prevent traffic loss during pod transitions.

See Enable graceful shutdown to prevent traffic loss.

Production readiness checklist

Before going live, verify that you have completed the following configurations. Beyond the performance and availability items covered above, also configure HorizontalPodAutoscaler, PodDisruptionBudget, and resource requests/limits on your gateway Deployment to handle scaling and disruptions gracefully.

Performance

ConfigurationStatusNotes
Multi-region deployment with intelligent DNSRequired for geo-distributed usersReduces client-to-gateway latency
Terway CNI plug-in for direct pod forwardingRecommended for all production clustersEliminates NodePort hop
Multiple CLB instancesRequired when traffic exceeds single-instance capacityIncreases total throughput
TLS acceleration (Intel Multi-Buffer)Recommended on commercial editionUp to 80% QPS improvement

Availability

ConfigurationStatusNotes
Active geo-redundancy across regionsRequired for region-level disaster recoveryAutomatic failover with intelligent DNS
Multiple CLB instancesRequired to eliminate load balancer SPOFProvides CLB-level redundancy
Pod anti-affinity and topology spread constraintsRequiredDistributes pods across nodes and zones
Pre-stop hooks on service podsRequiredDrains in-flight requests before termination
Connection draining on CLB instancesRequiredPrevents traffic loss during scaling
HorizontalPodAutoscaler on gateway DeploymentRecommendedAuto-scales gateway pods based on load
PodDisruptionBudget on gateway DeploymentRecommendedPrevents voluntary disruptions from removing too many pods
Resource requests and limitsRecommendedPrevents resource contention and OOM kills

Related topics