HAProxy + Heartbeat using a virtual IP address

Hi everyone,

Not sure if this has been asked before, did a search on HAProxy on the forums but couldn't really find anything specific to my question.

I need to set up HAProxy to act as a high-availability service for my MySQL master<>master set up and my RabbitMQ cluster. However, for this to work I require a virtual private IP and I can't really find any settings where I can add a private IP address. Even if there was, I'm not quite sure to which VM to add it to. The idea to to have two load balancers, lb1 & lb2, running heartbeat for high availability.

I was looking into using a NodeBalancer but it seems that NodeBalancers only seem to have public IP's, is this correct?

Any insights appreciated.

Cheers,

Luke

4 Replies

NodeBalancers only have public IPs yes.

On your Linodes, there's a link to add a private IP in the 'Remote Access' tab. There you can add it, setup a failover IP, and choose which Linodes should be allowed to share that IP.

Keep in mind that our NodeBalancers are already highly available for you. That's part of the service that you get. You may just want to make the two Linodes running MySQL highly available between themselves. Then, if the DB service is publically available, forward port 3306 on the NBs to the failover IP address.

Hi,

Thanks for that.

Sorry, I should have mentioned, all my VM's already have a private IP. I currently have a small set up comprised of about 11 Linodes running in a VPN with a NodeBalancer for the web-tier.

There you can add it, setup a failover IP, and choose which Linodes should be allowed to share that IP.

Sorry, I don't see any of that.

As far as I can see I can only add one private IP to each VM so I don't understand how can add the virtual IP address. There is no option for me to add another private IP to a VM or to create a virtual IP.

If you need more than one private IPv4 address, Linode Support can help you out. You just need to open a ticket to request it. They will ask which Linode is it for. This is just the Linode that the IP will technically 'belong' to however once you enable failover multiple Linodes that you select (in the same DC) will be able to use it.

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