parallel deployment possible?

44 views
Skip to first unread message

Korbinian

unread,
Jul 26, 2017, 10:08:30 AM7/26/17
to Payara Forum
Hi,

it seems tomcat 8 has some kind of parallel deployment option. ( http://tomcat.apache.org/tomcat-8.5-doc/config/context.html#Parallel_deployment )
Is something possible with payara, too?

Best,

KB 

Mike Croft

unread,
Jul 26, 2017, 10:33:01 AM7/26/17
to Payara Forum
We've got a fairly in-depth blog on rolling upgrades here:

Korbinian

unread,
Jul 28, 2017, 5:13:46 AM7/28/17
to Payara Forum
Hello Mike,

not really. The difference here is that with payara you need a big infrastructure to get it going while in tomcat 8 you just can say: hey tomcat, deploy that app but please have the old verision still running for all the folks that use these currently and have a session with it. As soon as all the sessions are invalidated (e.g.: timed out) remove the old app from memory;

So tomcat 8 really handles everything for you;

Hope this example made it clear what I'm looking for;

Ondrej Mihályi

unread,
Jul 28, 2017, 6:29:04 AM7/28/17
to Korbinian, Payara Forum
Hi,

I'm not aware that Payara Server can run 2 versions of the same application at the same time. It supports some related concepts, but none is as robust as what Tomcat probably provides.

With Payara server, you can get very close to the same behavior with --keepstate argument to the redeploy command or alternatively an element in a descriptor file. It won't keep the old version of the app running, but it will try to serialize all live session before the old version is deployed and deserialize them into the new version. The downside is that it's less robust because deserialization may fail in some cases and if anything fails, everything is thrown away. It's supported only on the default server instance, therefore it's mostly intended during development stage to keep sessions across frequent redeployments.

In production, it's worth to invest some time to set up the infrastructure for rolling upgrades, because most production environments run a cluster of servers with a load balancer anyway.

If you don't want to migrate old sessions to the new version of your application, you don't have to enable session replication with rolling upgrades. It's enough to create 2 different domains behind a load balancer with sticky sessions and instruct the load balancer to route new sessions only to the domain with the new version. After all old sessions are closed, get rid of the old domain. I know it's not automatic and requires manual steps during a potentially long period, but it's as close as you can get with Payara server if you really want to keep user sessions and you'd rather run 2 parallel versions of your application instead of migrating the session to the new application with --keppstate option.

Ondro

--
You received this message because you are subscribed to the Google Groups "Payara Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/88c135f6-d15c-4167-91bc-2773864cfb38%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Korbinian

unread,
Jul 30, 2017, 5:23:05 AM7/30/17
to Payara Forum, korbini...@gmail.com
Hello Ondro,

thank you for your response. I checked with the --keepstate argument, but since I'm using wicket it usually always breaks my app when I try to reuse the old sessions with the new app versions (beside from most trivial changes).

I understand your point with clusters in production, however we dont need a cluster yet and I really try to avoid it a bit since it adds additional problems you wont face in a single instance deployment.  A solutions for us would be more to run 2 single instances and let them switch by the load balancer based on session so we could turn off the old one as the usage of it is at 0 (so basically what tomcat does inside).

Best,

KB
To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages