Benefits
Each Elastic Compute Service (ECS) instance is assigned a private IP address as the primary IP address. You can associate HAVIPs with an ECS instance to increase the number of private IP addresses available for the ECS instance. Both the primary IP address and HAVIPs of an ECS instance can be used to establish connections. In addition, you can use HAVIPs with HA software such as Keepalived to deploy services in active/standby mode. This improves the availability of your services. You can associate a HAVIP with ECS instances by using the following methods:
- Directly associate an HAVIP with ECS instances.
Each HAVIP can be associated with multiple ECS instances. After a HAVIP is associated with ECS instances, one ECS instance can send Address Resolution Protocol (ARP) messages to advertise the HAVIP. Then, the ECS instance serves as the primary instance, and the other ECS instances serve as secondary instances. If the primary ECS instance is down, a secondary ECS instance takes over to provide services. You can associate one HAVIP with at most 10 ECS instances.
- Associate an HAVIP with the primary elastic network interfaces (ENIs) or secondary ENIs of ECS instances.
If you associate a HAVIP with the primary ENIs or secondary ENIs of multiple ECS instances, one ENI can send ARP messages to advertise the HAVIP. Then, the ENI serves as the primary ENI and the other ENIs serve as secondary ENIs. If the primary ENI is down, a secondary ENI takes over to provide services. You can associate one HAVIP with the primary or secondary ENIs of at most 10 ECS instances.
HAVIPs provide the following features:
- HAVIPs are private IP addresses that are not statically assigned to ECS instances or ENIs. HAVIPs can be associated with or disassociated from ECS instances or ENIs through ARP announcements.
- HAVIPs can be associated with ECS instances or ENIs that belong to the same vSwitch.
- You can associate each HAVIP with at most 10 ECS instances or 10 ENIs. However, you cannot associate an HAVIP with an ECS instance and an ENI at the same time.