Greetings,
I'm looking to do a rotational deployment with my configuration. I've got 5 instances running that run Tomcat, and all five are in an instance group, and a backend service that a load balancer uses.
What I'd like to do is be able to do a send a deployment to Tomcat but gracefully remove servers from rotation until they start up successfully again. The idea is to keep anyone from getting a 500+ error while visiting the site during a deployment. Connection draining seems to affect the entire backend service (all five instances).
Essentially the script I'm writing queries the available webservers and splits it up into two groups based on percentage (meant to scale later). One group handles traffic while the second group is upgraded, Tomcat is restarted, and loops until they report a 200 or times out as a failed deployment. Then the first group is upgraded.
Absolute worst case, I figure I can add a firewall rule on the instance to forward the request to the web servers not undergoing upgrade yet.. then remove the firewall rule upon completion/failure. My hope is to be able to have it managed through the HTTP/HTTPS load balancer.
Has anyone done something similar or have any thoughts?
Thanks in advance,
Michael