How can I upgrade a Java EE application without downtime?

How can I automate (without downtime) deployment?
And to be able to disable any server for maintenance.
What tools should be used?

I am using Tomcat, but I am ready to switch to another Java EE server that is most suitable for the requirements presented.

I would like to know how to use configuration details.

+4
source share
2 answers

If you have two tomcat working in a cluster (behind a load balancer or behind Apache), it is very simple.

  • Take server 1 from the cluster, upgrade it.
  • Return server 1.
  • Take server 2 from the cluster, upgrade it.
  • Return server 2.

Everything else will lead to downtime (albeit brief) if you are doing a complete redistribution of your application.

If you can put up with a short downtime (<1 s), you can emulate this by deploying to the second tomcat instance, and then point your load balancer to the second instance. In this case, you will lose any active sessions, but the switch should be quick.

In both cases, there are problems with database synchronization, which you will have to solve.

+3
source

Since WebLogic 9, WebLogic has a feature that allows you to deploy a new version of the application without downtime, called parallel deployment:

Gradual deployment: BEA WebLogic Server 9.0 allows you to deploy multiple versions of the same application through a WebLogic cluster; new customer requests are sent to the new version, and there is no effect on existing customers of the old version. BEA WebLogic Server will automatically resign the old version as soon as all existing clients have completed their processing. This eliminates the need to create replicated versions of the production environment, deploy two different versions in two environments, or use a load balancer to apply traffic slicing to the new version.

WebLogic Server also supports whole server-level migration , where the migration server instance and all its services are migrated to another physical machine. This can be used for server maintenance.

Please note that all server migration is not supported by all platforms and, obviously, has a small cost (in terms of infrastructure).

+3
source

Source: https://habr.com/ru/post/1300117/


All Articles