An Edge High-Availability Virtual IP (HAVIP) is a private IP resource that you can create and release independently. It has the same network access capabilities as the private IP address of an Edge Node Service (ENS) instance. You can use an HAVIP with high availability (HA) software, such as Keepalived, to build HA primary/standby services and improve service availability. An HAVIP can also be attached to one Elastic IP Address (EIP), multiple ENS instances, or the elastic network interfaces (ENIs) of multiple ENS instances. This enables IP drift in an HA architecture with multiple servers within the same edge zone, which ensures that the private IP address used for external services remains unchanged.
Background information
In physical data centers, servers can announce their IP addresses using the Address Resolution Protocol (ARP) to provide services. Many application scenarios and common software require hosts to have this capability. For example, software such as Keepalived or Heartbeat is used to implement HA solutions where the service IP address remains constant during disaster recovery.
However, after most cloud vendors adopted Software-Defined Networking (SDN) architecture, the ARP broadcast function is not supported in a Virtual Private Cloud (VPC) environment because these environments use Layer 3 forwarding with VXLAN. In addition, cloud network environments are built using virtualization technology. The IP addresses of virtual servers are allocated and managed by the underlying virtualization stack of the cloud platform. Applications cannot modify host IP addresses as they can in a traditional data center. To solve this problem, ENS introduced the HAVIP feature.
How it works
An HA primary/standby cluster is built using one HAVIP and two ENS instances:
Keepalived configuration: Attach the HAVIP to ENS-1 and ENS-2. Install the Keepalived software on both instances. In the Keepalived configuration file, set the
virtual_ipaddressto the HAVIP address. You also need to set thepriorityin the configuration file. A higher value gives an instance a higher priority to become the primary server.Primary server election: The Keepalived software is based on the Virtual Router Redundancy Protocol (VRRP). By comparing the
priorityvalues of ENS-1 and ENS-2, Keepalived automatically elects the ENS instance with the higher priority, such as ENS-1, as the primary server. The other instance, such as ENS-2, becomes the standby server. The system then automatically updates the mapping between the HAVIP and the primary server. All traffic destined for the HAVIP is forwarded to the primary server.Primary/standby switchover: The primary server periodically sends heartbeat messages to the standby server. The heartbeat interval is determined by the
advert_intparameter in the configuration file. If the standby server does not receive a heartbeat message within the specified time, the Keepalived software automatically promotes the standby server to become the new primary server. After the system detects this change, it automatically updates the mapping between the HAVIP and the new primary server. All traffic destined for the HAVIP is then forwarded to the new primary server. This process ensures that the service IP address remains unchanged during the switchover.
Scenarios
Public-facing high availability service
As shown in the following figure, the ENS-1 and ENS-2 instances use Keepalived and are attached to the same HAVIP to form a primary/standby HA cluster. ENS-1 announces the HAVIP using ARP. After the announcement succeeds, ENS-1 acts as the primary instance and provides services to the Internet through an EIP that is attached to the HAVIP. ENS-2 acts as the standby ENS instance.
If ENS-1 fails, ENS-2 automatically runs its takeover program to take over the services from ENS-1. This ensures high availability for the service.
Internal-facing high availability service
As shown in the following figure, the ENS-1 and ENS-2 instances use an HAVIP and Keepalived to form an internal-facing HA service. Another instance in the VPC, such as ENS-3, can access this service over the private network. The service endpoint is the IP address of the HAVIP. If ENS-1 fails, ENS-2 automatically runs its takeover program to take over the services from ENS-1. This ensures high availability for the service.
Limits and quotas
Category | Default limit |
Supported network type for HAVIP | VPC Type |
Supported IP version for HAVIP | IPv4 |
Number of HAVIPs that can be attached to a single ENS instance | 5 |
Number of EIPs that can be attached to a single HAVIP | 1 |
Number of ENS instances or ENIs that can be attached to a single HAVIP | 10 |
Broadcast and multicast support for HAVIP | Only unicast is supported |
Billing
During the public preview period, the HAVIP feature is provided free of charge. No Service Level Agreement (SLA) is provided for this feature.