I have successfully set up the load-balancing multiple Apache Tomcat servers using Apache web server. I am using mod_jk and the weight for each Tomcat is controlled via "lbfactor".
Now, every time I need to deploy a newer version of my application to Tomcat, I do NOT want my users to be affected (transparently). Hence, I am thinking below.
1. Change 1 (one) Tomcat server's lbfactor to 0....so all the existing connection from this server will be gone.
2. Shutdown this Tomcat server, deploy the new application and restart it.
3. Change the lbfactor back to 1.
4. Change the rest of Tomcat's lbfactor to 0 and repeat steps 1-3 for them.
1. When I changed the lbfactor (in the workers.properties), can I use graceful restart so that the apache is still receiving the connection and users are not affected?
2. When I change the lbfactor to 0, how do I check (in Apache) is there still any active connection to my Tomcat server whose lbfactor have been set to 0? Or will all the existing sessions be immediately transferred to other servers by Apache?