API Doc
Search Docs...
⌘ K
ACOSABSAVEANSABDR
  • ANS virtual private cloud networking technical whitepaper>
  • Technical implementation

Gateway high availability

Multiple gateway clusters

As shown in the figure, you can create multiple edge gateway clusters for a VPC service. Each edge gateway cluster is deployed independently with its own external subnet configuration.

VPC gateway services can be deployed to designated edge gateway clusters as needed. When an edge gateway cluster fails, traffic can be switched to another edge gateway cluster, improving service availability.

Primary-secondary gateway cluster group

You can associate two independent edge gateway clusters to achieve primary-secondary disaster recovery. The edge gateway cluster group communicates with virtual machines inside the VPC through the TEP network, and communicates with networks outside the VPC through the external subnet group.

The specific mechanism is as follows:

  1. The primary edge gateway cluster serves traffic by default. When the primary edge gateway cluster fails, traffic automatically fails over to the secondary edge gateway cluster.

  2. The primary and secondary edge gateway clusters perform heartbeat detection via UDP. If heartbeats from all gateway virtual machines in the peer cluster are not received for 3 consecutive times, the peer cluster is considered to have failed and a traffic failover is triggered. When the primary edge gateway cluster recovers, traffic automatically switches back to the primary cluster.

    To prevent flapping, the failover frequency is limited as follows:

    • At most one automatic failover per 3 minutes
    • No failover within 10 minutes of a service restart (including upgrades)
    • No frequency limit for manual failovers
  3. After a traffic failover is triggered by the edge gateway cluster group, traffic on the VPC side automatically switches to the healthy edge gateway cluster. Traffic from external networks accessing the VPC requires the HA policy of the external service to perform the switchover.