1

We have an web application running on Tomcat 6 (on WS2K3) which is updated every week as of a new release. Currently, we have a very simple batch script that every night checks the content of one folder on the server, if a war file exists it closes the Tomcat service, removes the old application directory and war file, and we put a new war file in there and bring the service online again.

While this works OK and we're experiencing less than 5 minutes of downtime each of these deployments, growing business needs make us look for another solution.

The best solution I can think of would be to put a load balancer/proxy in front of the webserver, add another webserver for staging and load balancing, and during deployments disable one of these hosts in the load balancer configuration, deploy, then redirect all traffic to the webserver with the new version and so on.

Problem: I have no experience of these kinds of solutions and very little around these topics, if anyone could point me in the right direction in terms of solutions (is this even a good way to achieve near-0-downtime and flexible deployments?) or names of software (free are best, but proprietary is fine as well) that would be very appreciated.

dadver
  • 183
  • 1
  • 11

1 Answers1

2

For one thing, you can use the standard Tomcat manager application to redeploy an application from a WAR without having to stop Tomcat itself. Downtime is only what's needed for deploying that single app.

But for near-0 downtime you really do want a load balancer and multiple Tomcat servers. Apache HTTP server with mod_proxy/mod_proxy_balancer or mod_jk is a good free solution for this. You do have a choice to make about how to handle sessions, however - you can either lose them when you switch from one server to the other, or replicate them between the servers (which is fairly easy to configure). Most of the complexity of clustering and load-balancing revolves around session handling.

sosiouxme
  • 136
  • 1