I am configuring a High Availability load balancing based on HAProxy and Keepalived. Everywhere I do research they talk about Virtual IP like something that fell off the sky – I mean, with little to none explanation about how to get one.
By now, I have arbitrary defined a virtual ip address in the keepalived.conf like this:
virtual_ipaddress {
10.0.0.100
}
With both Servers running keepalived, I do ip address
command in the MASTER machine and it shows inet 10.0.0.100/32 scope global eth0
next to the Public IP, which I believe is correct.
When I do service keepalived stop
in the MASTER machine and run ip address
in the BACKUP machine, BACKUP shows inet 10.0.0.100/32 scope global eth0
, IP which effectively disappeared from MASTER.
The above mentioned behavior indicates me that the config is all right.
Now, how can I publish that Virtual IP? Do I need to buy one? If my server provider (Contabo) doesn't offer the Virtual IP service, where to buy it?
My goal is to have my Front-End API requests aiming at the Virtual IP.
Thanks very much in advance for any guidance!