Graceful restart for load-balancing multiple Apache Tomcat servers

Hi,

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.

Now, questions.
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?

Thx
David

LVL 16
suprapto45Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
suprapto45Author Commented:
Thx,

Sorry for the delay. I was very busy today. Let me hv a look at them tomorrow morning and i will let you know.

Thanks again
David
0
suprapto45Author Commented:
Hi arober11,

Perfect solution. Thanks again.
David
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.