HAProxy as Load Balancer
How do I set up a floating IP with HAProxy and Keepalived?
1 Reply
If I'm understanding you correctly, you want to use HAProxy on a Linode as your load balancer using Keepalived to monitor for instances of failover. That's not a problem at all! We have two guides that will be very helpful in explaining this setup for you.
HAProxy
This first guide will walk you through setting up HAProxy on your Linode for load balancing purposes. It will tell you how to download the software as well as offer some configuration settings.
The floating IPs will need to be used with two private IPs on the front backend and back backend Linode servers. You will need to open a support ticket for the additional IP address.
HAProxy's documentation will help should you have any specific questions from there.
Keepalived
The next guide has a section that will walk you through how to configure the failover using Keepalived on your Linode.
Configure IP Failover
Configure IP failover on linode2 and linode3 to take on the floating IP address from linode1 in the event that it fails.
Go to the Remote Access tab in the Linode Manager for linode2, and click IP Failover under your public IP addresses.
You’ll see a menu listing all of the Linodes on your account. Check the box corresponding to the new private IP address for linode1, which we will now refer to as the floating IP address, and click Save Changes.
Repeat the above steps to configure IP failover for linode3 as well. Make sure to select the same IP address.
I hope this is helpful and happy load balancing!