1

I read about using haproxy and keepalived to avoid spof for haproxy. Is it possible to do this in ec2?

Say I have 2 instances. Each with haproxy and keepalived installed. The VIP shall be aws elastic IP.

twb
  • 1,248
  • 4
  • 18
  • 31

1 Answers1

0

In theory this should be possible, there are blog posts dotted around with instructions on how to do it. However I have been trying to test this over the past few days but not had any luck with it.

Amazon blocks multicast on EC2 (Classic) so the primary communication method for Keepalived will not work. You need to install the latest version (at time of writing this is 1.2.13) which has unicast support built in. This should allow you to bypass the multicast restrictions that Amazon puts in place. I think the version of the keepalived package is 1.2.7 in the repos (yum install keepalived) which does not have the unicast patch included..

You should be able to use wget to download the latest TAR, unpackage it and build it from source (./configure prefix=/, make, make install). Make sure you have the GCC package and openssl-devel package installed before trying to configure as it will fail with errors otherwise.

If I get it working in the meantime I will come back and put a link to my blog with the exact steps needed :)

rosey85uk
  • 95
  • 2
  • 12