Reputation: 11
I have multiple wars deployed in tomcat with inter-dependencies. Unless the tomcat deploys successfully(i.e. all wars), I want to block all incoming user requests to the server as it causes an unnecessary overhead(error messages, exceptions etc). Can someone suggest a way to block incoming requests to tomcat until tomcat is completely deployed.
Thanks.
Upvotes: 1
Views: 379
Reputation: 131112
A general practice used in many places is to use a load balancer in front and rotate a server in to production.
EG:
[Load Balancer] | | [Web1] [Web2] Step 1: [Load Balancer] | | [Web1] [Take Web2 offline] Step 2: [Load Balancer] | | [Web1] [deploy Web2] Step 3: [Load Balancer] | | [Web1] [Add Web2 to pool]
The main issue with simply blocking all requests is that you will end up having multiple clients "stall" and feel that your site is not responsive during deployment.
Upvotes: 1