Note that there are some explanatory texts on larger screens.

plurals
  1. POHaproxy Load Balancer, EC2, writing my own availability script
    text
    copied!<p>I've been looking at high availability solutions such as heartbeat, and keepalived to failover when an haproxy load balancer goes down. I realised that although we would like high availability it's not really a requirement at this point in time to do it to the extent of the expenditure on having 2 load balancer instances running at any one time so that we get instant failover (particularly as one lb is going to be redundant in our setup).</p> <p>My alternate solution is to fire up a new load balancer EC2 instance from an AMI if the current load balancer has stopped working and associate it to the elastic ip that our domain name points to. This should ensure that downtime is limited to the time it takes to fire up the new instance and associate the elastic ip, which given our current circumstance seems like a reasonably cost effective solution to high availability, particularly as we can easily do it multi-av zone. I am looking to do this using the following steps: </p> <ol> <li>Prepare an AMI of the load balancer</li> <li>Fire up a single ec2 instance acting as the load balancer and assign the Elastic IP to it</li> <li>Have a micro server ping the current load balancer at regular intervals (we always have an extra micro server running anyway)</li> <li>If the ping times out, fire up a new EC2 instance using the load balancer AMI</li> <li>Associate the elastic ip to the new instance</li> <li>Shut down the old load balancer instance</li> <li>Repeat step 3 onwards with the new instance</li> </ol> <p>I know how to run the commands in my script to start up and shut down EC2 instances, associate the elastic IP address to an instance, and ping the server.</p> <p>My question is what would be a suitable ping here? Would a standard ping suffice at regular intervals, and what would be a good interval? Or is this a rather simplistic approach and there is a smarter health check that I should be doing?</p> <p><em>Also if anyone foresees any problems with this approach please feel free to comment</em></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload