Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How good is Elastic Load Balancing in EC2

I have seen a lot of old articles on SO. So i am asking it again. As of Apr 2012 how good is Elastic Load Balancing(ELB) in EC2. What are the alternatives to ELB for a EC2 server. What are the pro's and cons.

Also is EBL a magic sword that does everyting on it's own i.e i need not make any changes to my app

PS: i am complete newbie to all of these

like image 402
aWebDeveloper Avatar asked Oct 09 '22 02:10

aWebDeveloper


1 Answers

The biggest problem I've had with ELB is that there is a hard limit of 60 seconds per requests; if your use case requires any connection to last longer than 60 seconds ELBs will not work for you. Addendum: if your connection can do some sort of 'keepalive' traffic then the ELB won't kill it. For general, long-running HTTP responses, 60 seconds and you're out.

Another gotcha is that ELBs immediately kill all connections to an instance if it fails the number of health checks you put in your unhealthy threshold, so something like a graceful-stop in apache is difficult without keeping your unhealthy threshold higher than your longest running process, or over 60 seconds, both of which can seem like a lifetime depending on your app and expected responsiveness.

EDIT: ELBs support connection draining now: http://aws.amazon.com/about-aws/whats-new/2014/03/20/elastic-load-balancing-supports-connection-draining/

Also a common mistake is to forget to add the availability zones of your instances to the ELB or to misconfigure the health check.

ELB are very nice from a management standpoint but there are definitely still some nice features missing. Terminating SSL on the ELB is probably the biggest 'killer feature', and makes all the drawbacks insignificant and unimportant in comparison.

like image 152
gazarsgo Avatar answered Oct 12 '22 12:10

gazarsgo