Amazon EC2 Elastic Load Balancing - strategy for zero downtime server restart
Posted
by
Yoga
on Server Fault
See other posts from Server Fault
or by Yoga
Published on 2012-05-15T16:02:07Z
Indexed on
2012/08/31
15:42 UTC
Read the original article
Hit count: 229
I have 5 web servers (Apache/mod_perl) behind Amazon EC2 Elastic Load Balancing, when I deploy codes to the web servers, I am doing this..
- For each machine, shutdown the Apache
- Update the code
- Start over the server and proceed to the next server
I think when my server is shutdown, ELB will not distribute request to my server, but how about the request still serving?
I think a better approach is
- Stop accepting new request from ELB
- Sleep for sometimes, shutdown web server only if all requests are responded
- Update the codes
- Start the server again
But how to perform (1) and (2) from my local sever? Do I need to use AWS API? or other easy way to do it?
Thanks.
© Server Fault or respective owner