V
V
Vladislav2015-08-29 19:01:51
Java
Vladislav, 2015-08-29 19:01:51

How to silently redeploy a server?

Let's say there is an application - it works on a tomcat. People use it. Since the application is under development, each time you have to re-upload it in order to update the functionality and add a new one. So here's how to do it so that users don't get hurt? For example, the application often updates data from users and works with their internal accounts.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vyacheslav, 2015-09-24
@vkulakov

Recently dealt with a similar problem. So far I have found a simple solution for myself - Parallel deployment .
The bottom line is that in Tomcat you can deploy several versions of the same application at the same time. New users will work with the new version, old users with the old one. Old users are slowly falling off and when they all fall off, the old version of the application is deleted.
To implement this, I added the build number to the name of the war file and now it looks something like this: App##015.war. We throw the war file into webapps and in a couple of seconds we have a new version deployed. Very comfortably.
If desired, the old sessions can be cleaned forcibly and then the old version will immediately be deleted. This is in case there have been major changes (for example, the base scheme has changed a lot).

S
Stanislav Makarov, 2015-08-29
@Nipheris

Have several servers in rotation, take them out of rotation during deployment (it doesn’t really matter if the rotation is by IP or all behind one proxy), this will also give you a stable uptime. A server can fall on its own, we do not live in an ideal world.

S
Sergey Krasnodemsky, 2015-08-29
@Prognosticator

Why let's do it?
What kind of introductory ones :)
I didn’t solve your problem with Tomcat myself, but if I encountered it, I googled it for tomcat zero downtime deployment .
Then I would put the experiment in the dev environment. Then to production.
And humanity has invented continuous integration .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question