Home/Server & Website Managed Operations/Configuring Keepalived on Alibaba Cloud to Implement HA with HAVIP
Server & Website Managed Operations

Configuring Keepalived on Alibaba Cloud to Implement HA with HAVIP

Many cloud environments, including Alibaba Cloud, have been widely criticized for not supporting Floating IPs. Alibaba Cloud has recently released HAVIP (High Availability Virtual IP) under VPC networks, which enables ARP announcement of IPs. This makes it possible to build your own High Availability (HA) setup. I was fortunate enough to get early access and test it out. (Note: The classical network still does not support this.)

Test Environment:

1

VPC: 192.168.1.0/24
ECS:
nginx1: 192.168.1.1
nginx2: 192.168.1.2
HAVIP: 192.168.1.3
Public EIP bound to the havip: 121.43.187.37

The topology after configuration is as follows:

4
After setting up the environment, log in to the primary and standby ECS servers and configure nginx + keepalived on each.

[root@Nginx1 ~]# yum install nginx keepalived -y

The content and explanation of the `/etc/keepalived/keepalived.conf` configuration file for the MASTER server (nginx1) are as follows:

! Configuration File for keepalived
FREE CHECKUP

Free server checkup

We will send a problem checklist and remediation advice within one business day — no obligation to engage.

135 410 16684
Weekdays Mon – Fri 10:00 – 22:00 (UTC+8) · 7×24 emergency response
Call now
CONTACT

Contact Us

How can we help?

* Required