TomcatExpert

Parallel Deployment with Apache Tomcat 7

posted by mthomas on May 31, 2011 07:44 AM

Upgrading web applications can be very expensive if your storefront is the web. Weekend maintenance windows, or downtime in general can give an entire company heartburn. Survey data shows that web application downtime can cost some companies up to $72,000 per minute. Yet the cost of not constantly rolling out new features and bug fixes can equally penalize a company in the competitive online markets today.

Previously, to upgrade an application on Tomcat and avoid downtime, system administrators would have to set up multiple instances of Tomcat and do some very clever stuff with load balancers. This equals extra hardware costs as a permanent part of the company’s infrastructure.

Now with the advent of parallel deployment in Tomcat 7, you can have multiple versions of the same application installed at the same time on a single server. Users with active sessions can continue to use the old application and new users will be routed to the new version. This way, no user sessions will be interrupted, and the old application can gracefully phase out.

Setting Up Parallel Deployment

Parallel deployment is a function of the Context Container. The Context element represents a web application, which in turn specifies the context path to a particular Web Application Archive (WAR) file that is the application logic. Parallel deployment allows you to deploy multiple versions of a web application with the same context path concurrently. When choosing what version of the application for any given request, Tomcat will:

  1. Route new requests to the latest version, so new sessions go to the new application.
  2. If session information is in the request, check the session manager for a matching version, so existing sessions will go to the original application for the request.
  3. If session information is in the request, but the corresponding application is no longer present, it will route to the latest version.

Working Across Clusters

If you have clustered Tomcat, configured using the FarmWarDeployer, you can achieve parallel deployment within that cluster. The FarmWarDeployer is a component which lets you deploy a WAR file across an entire cluster. By placing the WAR file on the designated host, clustered Tomcat will automatically replicate that deployment across every server in the cluster.

Footnote

Because of the sophistication and cost savings this feature brings to enterprise deployments of Tomcat, this feature, built by VMware’s SpringSource, was initially looked at being part of VMware vFabric's tc Server, but once we got building it, it couldn’t be done cleanly without putting some hooks into Tomcat that didn’t fit naturally into the architecture. After careful consideration of what was best for Apache Tomcat, VMware decided to still fill the need to build this feature out, but donate it to the Apache Tomcat project at large.

Mark Thomas is a Senior Software Engineer for the SpringSource Division of VMware, Inc. (NYSE: VMW). Mark has been using and developing Tomcat for over six years. He first got involved in the development of Tomcat when he needed better control over the SSL configuration than was available at the time. After fixing that first bug, he started working his way through the remaining Tomcat bugs and is still going. Along the way Mark has become a Tomcat committer and PMC member, volunteered to be the Tomcat 4 & 7 release manager, created the Tomcat security pages, become a member of the ASF and joined the Apache Security Committee. He also helps maintain the ASF's Bugzilla instances. Mark has a MEng in Electronic and Electrical Engineering from the University of Birmingham, United Kingdom.

Comments

Parallel Deployment with Apache Tomcat 7

Are you saying that it is not available in open source version (Apace Tomcat 7.x)?

After reading this whole

After reading this whole article, I have to say that this is probably one of the most amazing articles that I've read in my lifetime. This is just the perfect article that you've published here. Thanks a lot for this! how to save on your power bill

I am very impressed with the

I am very impressed with the work that the writer has done here. This is, without a doubt, one of the most helpful articles that I have read on this blog. Thanks a lot for writing this article. Spring Forward

I haven’t any word to

I haven’t any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us.
what is phenq

Thanks for your information,

Thanks for your information, it was really very helpfull..
pool company reviews

The website is looking bit

The website is looking bit flashy and it catches the visitors eyes. Design is pretty simple and a good user friendly interface.
inz residence ec floor plan

I admire this article for the

I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much.
AliExpress

I am unable to read articles

I am unable to read articles online very often, but I’m glad I did today. This is very well written and your points are well-expressed. Please, don’t ever stop writing.
Hitting Drills

I found your this post while

I found your this post while searching for information about blog-related research ... It's a good post .. keep posting and updating information.
West Virginia Mesothelioma Law Firm

I can see that you are an

I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business.
new futura price list

Your blog provided us with

Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing. Keep blogging..
Plumber in Woodstock, Ga

This is a great inspiring

This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post.
new futura 4 bedroom

I have not any word to

I have not any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us.
먹튀검증

I am happy to find this post

I am happy to find this post very useful for me, as it contains lot of information. I always prefer to read the quality content and this thing I found in you post. Thanks for sharing.
Web Design

Thanks for the nice blog. It

Thanks for the nice blog. It was very useful for me. I'm happy I found this blog. Thank you for sharing with us,I too always learn something new from your post.
спално бельо

dani

Hello, I have browsed most of your posts. This post is probably where I got the most useful information for my research. Thanks for posting, maybe we can see more on this. Are you aware of any other websites on this subject.
learn here

I would like to thank you for

I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well..

reformer pilates

I would like to thank you for

I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well..
Hot Deals Today

Thanks for taking the time to

Thanks for taking the time to discuss that, I feel strongly about this and so really like getting to know more on this kind of field. Do you mind updating your blog post with additional insight? It should be really useful for all of us.
formation en ligne

Thank you for helping people

Thank you for helping people get the information they need. Great stuff as usual. Keep up the great work!!!
find more

Awesome article! I want

Awesome article! I want people to know just how good this information is in your article. It’s interesting, compelling content. Your views are much like my own concerning this subject.
Automotive Locksmith

DANI

Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!..
get more info

I am very enjoyed for this

I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy.
Bryant Digital

Sa

This is really a nice and informative, containing all information and also has a great impact on the new technology. Thanks for sharing it,
Dolce Vita

Thank you for some other

Thank you for some other informative blog. Where else could I get that type of information written in such an ideal means? I have a mission that I’m just now working on, and I have been at the look out for such information.
pokemon go generator

I like this post,And I guess

I like this post,And I guess that they having fun to read this post,they shall take a good site to make a information,thanks for sharing it to me.
Eesti e-sport

The website is looking bit

The website is looking bit flashy and it catches the visitors eyes. Design is pretty simple and a good user friendly interface.
pokemon go hack pl

Thanks for this great post, i

Thanks for this great post, i find it very interesting and very well thought out and put together. I look forward to reading your work in the future.
best laptop for producing music

Thank you for helping people

Thank you for helping people get the information they need. Great stuff as usual. Keep up the great work!!!
find here

I am very enjoyed for this

I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy.
Houston Admiral

Sa

I really like your writing style, great information, thankyou for posting.
San Antonio SEO

I am very enjoyed for this

I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy.
http://subcomon.com/

Thanks for the blog loaded

Thanks for the blog loaded with so many information. Stopping by your blog helped me to get what I was looking for.
http://ihowtolosefatfast.com/

Thanks for the nice blog. It

Thanks for the nice blog. It was very useful for me. I'm happy I found this blog. Thank you for sharing with us,I too always learn something new from your post.
visit here

Sa

Someone Sometimes with visits your blog regularly and recommended it in my experience to read as well. The way of writing is excellent and also the content is top-notch. Thanks for that insight you provide the readers!
look at this

This is truly a great read

This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!.
Driving School

This is very educational

This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post.!
go here

Sa

This is my first time visit here. From the tons of comments on your articles,I guess I am not only one having all the enjoyment right here!
Tide Charts

Sa

An interesting dialogue is price comment. I feel that it is best to write more on this matter, it may not be a taboo topic however usually individuals are not enough to talk on such topics. To the next. Cheers.
Serviced offices

Sa

Positive site, where did u come up with the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out what additional posts you include.
book repair

Sa

I just want to let you know that I just check out your site and I find it very interesting and informative..
https://bookrepairs.wordpress.com/caring-for-your-books/

Sa

Really a great addition. I have read this marvelous post. Thanks for sharing information about it. I really like that. Thanks so lot for your convene.
Internet marketing blog

Sa

You have done a great job on this article. It’s very readable and highly intelligent. You have even managed to make it understandable and easy to read. You have some real writing talent. Thank you.
certified seo

Sa

Good article, but it would be better if in future you can share more about this subject. Keep posting.
certified seo

Sa

I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business.
www.y8games.center

it was a wonderful chance to

it was a wonderful chance to visit this kind of site and I am happy to know. thank you so much for giving us a chance to have this opportunity..
usd kurs

BachJohann

thanks for this usefull article, waiting for this article like this again. pseudo pharmaceuticals shopify

BachJohann

I just couldn't leave your website before telling you that I truly enjoyed the top quality info you present to your visitors? Will be back again frequently to check up on new posts. podiatrist in cardiff

Saving electricity is one of

Saving electricity is one of the best methods to lower your monthly energy bills. Your electricity bill is among the most costly payments that you make every month apart from credit card and home loan. how to save on electricity

thanks for j sharing with

thanks for j sharing with that awesome articles thanks u a lot
rasoio elettrico | regolabarba | ferro da stiro con caldaia | Friggitrice ad Aria | scopa a vapore | ripetitore wifi | ripetitore wifi amplificatore wifi piastra a vapore | miglior aspirapolvere | skateboard elettrico | passeggino leggero | miglior smartphone | tablet per bambini yjn__

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.