Tuesday, October 10, 2006

Clustering web applications on Tomcat - Part 4

<- Part 3


Maintenance and Reliability

Tomcat:

Given that Tomcat shares the clustered state among all participating nodes, it is not unexpected that this architecture introduces bottlenecks at some point in the cluster. The overall throughput of the system drops as a function of the number of nodes added into the cluster. From the operations point of view, this can be a considerable overhead as IT cannot add capacity on demand.

Tomcat also supports a couple of persistent mechanisms which write the sessions on to disk or into a Database through JDBC. The caveat here is that the control over when these sessions are written to the persistent store is not very robust, and hence there can be some data loss and/or data integrity can be compromised.

Terracotta:

Terracotta functions as a dedicated state server and plugs into the JVM memory model to provide a highly transparent and efficient clustering implementation to resolve typical bottlenecks, as illustrated by the following diagram.

The Terracotta solution provides a persistent mode, where multiple instances of the Terracotta server share data through a shared disk space (e.g. SAN). This makes the solution more robust as it eliminates any single point of failure in the system.


A very interesting and powerful side-effect of the Terracotta solution is that the application is no longer constrained by the JVM heap size and has "virtual" memory available on demand. Typical 32 bit architectures allocate a maximum of 1.5-2 GB (approx.) heap to the JVM. If your application grows beyond this limit, the JVM will spend most of its time garbage collecting (very high performance hit) and will eventually throw an OOME (OutOfMemoryException). In the Terracotta world, the LRU (least recently used) objects are flushed from the local (client) cache to the Terracotta server, and the LRU objects on the server are flushed onto disk. Terracotta gives you "Network Attached RAM"; no more annoying OOMEs.


As mentioned before, Terracotta also ships with a very useful Admin Console Tool, which allows you to look at the shared sessions and the objects within the session at run time. From the operations perspective, it allows you to monitor the system cache activity, transaction rate and the cache hit ratio as shown in the following screenshots.


Conclusion

Pairing Tomcat with Terracotta delivers a very unique and powerful linear-scale and high-performance HTTP Session clustering solution. Your existing Tomcat environment becomes very powerful and scalable by introducing Terracotta Sessions into the picture. Terracotta allows you to use clustering as an infrastructure-level service by not introducing any clustering code in your application.

Because of its unique architecture, Terracotta delivers the following benefits:

  • Linear scale-out
  • Significantly reduced TCO
  • High performance
  • No application changes – it is not necessary to write to an API, implement serialization, or call setAttribute().
  • Network efficiency – Without serialization, changes are detected and transmitted at the field level. Replication of data occurs only where necessary.
Terracotta Sessions can be downloaded here.

<- Part 3

18 comments:

Kevin Le said...

Exactly what I have been looking for. Could you please comment on the cost? Thanks

Kevin Hoang Le
http://pragmaticobjects.org

GuruKool said...

Hello Kevin,
You can get pricing information by writing to Gino Thiers [gthiers@terracottatech.com].

- Kunal.

Anonymous said...

Can anyone recommend the well-priced Endpoint Security program for a small IT service company like mine? Does anyone use Kaseya.com or GFI.com? How do they compare to these guys I found recently: N-able N-central remote pc
? What is your best take in cost vs performance among those three? I need a good advice please... Thanks in advance!

Penis Enlargement Pills said...

I am thoroughly convinced in this said post. I am currently searching for ways in which I could enhance my knowledge in this said topic you have posted here. It does help me a lot knowing that you have shared this information here freely. I love the way the people here interact and shared their opinions too. I would love to track your future posts pertaining to the said topic we are able to read.

airbnb clone said...

Thanks for the post. It was very nice.
Angry birds flash| Angry birds flash|

Discount penis enlargement pills said...

This entire setup looks really good.

Vigorelle natural female sexual enhancement gel said...

Hence there can be some data loss and/or data integrity can be compromised....

www.tuweb.biz said...

Wow, there is a lot of helpful information in this post!

ExtremeNO muscle enhancer supplement said...

This is exactly what I have been searching for. I am really thankful to you.

Vigaplus erectile dysfunction pills review said...

These sessions are written to the persistent store is not very robust, and hence there can be some data loss..

XtremeNO fast muscle growth supplement said...

Clustering web application on Tomcat is originally very interesting.I was amused to look over the post.

hcg buy online said...

It does help me a lot knowing that you have shared this information here freely. I love the way the people here interact and shared their opinions too. HCG Blue Drops, the Faster and Natural way to lose weight....

ExtremeNO muscle enhancer supplement said...

Very impressive . thanks for share your work .

Duramale prevent premature ejaculation pills said...

Tomcat also supports a couple of persistent mechanisms which write the sessions on to disk or into a Database through JDBC.

Buy Vitoslim pills said...

Tomcat also supports a couple of persistent mechanisms which write the sessions on to disk or into a Database through JDBC.

Android app developers said...

I like your blog technique.Your blog information is really beneficial.I like this post.

Best Infant car seat 2012 said...

Tomcat should not be confused with the Apache web server, which is a C implementation of an HTTP web server

price per head said...

I'll be visiting your site again to gather some more valuable information. You truly did a good job.