HAProxy as Load Balancer

Linode Staff

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.

  1. Go to the Remote Access tab in the Linode Manager for linode2, and click IP Failover under your public IP addresses.

  2. 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.

  3. 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!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct