When you run services on ENS instances inside a VPC, Keepalived cannot announce a new primary server through ARP because VPCs use Layer 3 VXLAN forwarding instead of broadcast. An Edge High-Availability Virtual IP (HAVIP) is a private IP resource that you can create and release independently. It solves this by providing a floating private IP that the ENS control plane remaps automatically when Keepalived signals a failover—keeping the service endpoint constant without requiring any IP change on the client side.
A HAVIP can be attached to one Elastic IP Address (EIP), multiple ENS instances, or the elastic network interfaces (ENIs) of multiple ENS instances within the same edge zone.
How it works
An HA primary/standby cluster uses one HAVIP and two ENS instances:
Keepalived configuration: Attach the HAVIP to ENS-1 and ENS-2. Install Keepalived on both instances. In the Keepalived configuration file, set
virtual_ipaddressto the HAVIP address and setpriorityfor each instance. A higherpriorityvalue means higher eligibility to become the primary server.Primary server election: Keepalived uses the Virtual Router Redundancy Protocol (VRRP) to compare
priorityvalues. The instance with the higher priority—for example, ENS-1—becomes the primary server. ENS-2 becomes the standby server. The system automatically maps the HAVIP to the primary server, and all traffic destined for the HAVIP is forwarded there.Primary/standby switchover: The primary server sends periodic heartbeat messages to the standby server. The interval is controlled by the
advert_intparameter. If the standby server stops receiving heartbeats within the specified time, Keepalived promotes it to primary. The system updates the HAVIP mapping automatically, so the service endpoint remains unchanged throughout the switchover.
Use cases
Public-facing high availability service: ENS-1 and ENS-2 use Keepalived and are attached to the same HAVIP to form a primary/standby HA cluster. ENS-1 announces the HAVIP via Address Resolution Protocol (ARP) and acts as the primary, serving internet traffic through an EIP attached to the HAVIP. ENS-2 acts as the standby. If ENS-1 fails, ENS-2 takes over automatically.
Internal-facing high availability service: ENS-1 and ENS-2 form an internal HA service using an HAVIP and Keepalived. Other instances in the Virtual Private Cloud (VPC)—such as ENS-3—access the service over the private network using the HAVIP address as the service endpoint. If ENS-1 fails, ENS-2 takes over without changing the endpoint.
Why HAVIP is required in VPCs
Why does ENS need HAVIP if Keepalived already supports HA?
In physical data centers, Keepalived uses VRRP to elect a new primary server during a failover. The new primary binds the virtual IP to its network interface and broadcasts a gratuitous ARP to announce the takeover.
After cloud providers adopted Software-Defined Networking (SDN), VPCs use Layer 3 forwarding with VXLAN, which does not support ARP broadcast. The virtualization stack controls all IP allocations—applications cannot reassign host IPs the way they can on bare metal. Configuring a regular private IP as the virtual_ipaddress in Keepalived will not trigger an IP takeover because the ARP announcement has no effect.
HAVIP solves this by providing a floating IP that the ENS control plane can remap programmatically when Keepalived signals a VRRP state change.
Limits and quotas
Usage constraints
Only VPC-type networks are supported. Classic networks are not supported.
Only IPv4 is supported.
Only unicast is supported. Broadcast and multicast are not supported.
Quotas
| Resource | Default quota |
|---|---|
| HAVIPs per ENS instance | 5 |
| EIPs per HAVIP | 1 |
| ENS instances or ENIs per HAVIP | 10 |
Billing
HAVIP is free of charge during the public preview period. No Service Level Agreement (SLA) is provided during this period.