Saturday, September 21, 2013

Session replication / clustering / failover with Tomcat (Part 1 - Overview)

This is my first post of a series about Tomcat and clustering.
In this post i will explain some different replication mechanism.


NOTE: A common drawback of replication, like it's defined in the specs, is that only HttpSession#setAttribute(...) triggers replication.
This means that if you store a container object in the session and if you change a variable inside the object, you must HttpSession#setAttribute(...) again to replicate the modified object again.
Many frameworks implements a simple workaround for it - i will write about it another post.


All to all replication / DeltaManager 


With this mode, Tomcat just replicates the session to all registered nodes.



Pro:
  • No single point of failure at software level
  • Every node holds all sessions
  • In theory, all other nodes can be turned off
  • No extra software is needed
  • Synchronous or Asynchronous replication
  • Open Source
  • Enterprise-Support available
Contra:
  • High memory usage and network traffic because all nodes holds all sessions
  • Objects which are stored in the session must be triggered manually to replicate again if a property has been changed
  • Slower session serialization



Primary/Secondary Replication (Buddy Replication) / BackupManager


The sessions will be replicated to the next neighbor. If one Tomcat is not available anymore, the neighbor still holds the sessions.



 Pro:
  • No single point of failure at software level
  • Lower memory usage and network traffic because the session is not stored on all nodes
  • No extra software is needed
  • Synchronous or Asynchronous replication
  • Open Source
  • Enterprise-Support available
 Contra:
  • Not quite as battle tested as the All-to-all replication (see Tomcat documentation)
  • Objects which are stored in the session must be triggered manually to replicate again if a property has been change
  • Slower session serialization



Memcached-session-manager


Each Tomcat replicates all sessions to N (multiple) Memcached nodes.
If a session is not available on the local Tomcat, the memcached-session-manager tries to lookup the session from the Memcached nodes.



 Pro:
  • No single point of failure at software level
  • More scalability
  • Session will be replicated to N “Memcached” nodes – The sessions are still available if all webservers are down
  • Automatically handles “Memcached” nodes failover
  • Sticky mode: Lower memory usage because every node holds only the current used sessions
  • Non-Sticky mode: Lowest memory usage because Tomcat does not hold the sessions anymore. Session will be received from memcached for each request
  • MSM will automatically trigger replication if a property in a session stored object has been changed
  • Faster session serialization – Changeable mechanism
  • Synchronous or Asynchronous replication
  • Open Source
  • Enterprise-Support available for Tomcat
 Contra:
  • Extra software needed (“Memcached” plugin and nodes)
  • Cannot switch to another Java Webserver which does not automatically check changed values in the session - but only if the used framework has no implemented workaround
  • AFAIK no Enterprise-Support available for the Memcached plugin but Martin Grotzke is very active on the mailing list

89 comments:

  1. Wow! This was awesome. Big thanks!

    ReplyDelete
    Replies
    1. Software Development: Session Replication / Clustering / Failover With Tomcat (Part 1 - Overview) >>>>> Download Now

      >>>>> Download Full

      Software Development: Session Replication / Clustering / Failover With Tomcat (Part 1 - Overview) >>>>> Download LINK

      >>>>> Download Now

      Software Development: Session Replication / Clustering / Failover With Tomcat (Part 1 - Overview) >>>>> Download Full

      >>>>> Download LINK KV

      Delete
  2. Very Nice Blog, Thanks for sharing such a nice blog. It is very simple to use while being compatible with all the popular versions of Windows find and replace in word

    ReplyDelete
  3. I like this concept. It's very doable. I like it also because it is sane.
    best mobile app development company in punjab

    ReplyDelete
  4. website designing, website development, website hosting, mobile apps development, logo designing, SEO
    https://codevectors.com/

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. 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.

    best seo services in lahore

    ReplyDelete
  8. I'm glad I found this web site, I couldn't find any knowledge on this matter prior to.Also operate a site and if you are ever interested in doing some visitor writing for me if possible feel free to let me know, im always look for people to check out my web site.

    best seo company in lahore

    ReplyDelete
  9. The post is written in very a good manner and it contains many useful information for me.

    best digital marketing agency in lahore

    ReplyDelete
  10. I admit, I have not been on this web page in a long time... however it was another joy to see It is such an important topic and ignored by so many, even professionals. I thank you to help making people more aware of possible issues.

    best web hosting in lahore

    ReplyDelete
  11. I really love your blogs. I am amazed by the way you have explained things in this article. Thank you so much for sharing this information. Quickbooks File

    ReplyDelete
  12. I’m so happy that you just shared this useful info with us. Please stay us informed like this, Thanks a lot for giving everyone an extraordinarily special possibility to check tips from here. Regards, BMSAS Technology is the Best Software Development Company

    ReplyDelete
  13. Thanks for sharing this information.
    Biharapps is the best website design agency and mobile app development company in Dubai, UAE. Top andoid app developers and iOS app developers , web designers in Dubai, UAE and Software development company in Dubai, UAE. We are Digital Marketing Agency and SEO Company in UAE.

    ReplyDelete
  14. In this era we are surrounded by different technological amenities with all businesses having an online presence, you need secure and trustworthy cybersecurity solutions to keep it safe from any potential security threat.

    Breeze End Technology, LLC offer reliable and top-notch cybersecurity to help organizations fight cyber risks. We cover all aspects of cybersecurity to provide you with a complete range of services as our team is constantly on the verge of the latest advancements.

    We work with a comprehensive approach to keep your business safe from cyber threats. From cybersecurity program strategy to risk assessment, threat intelligence to security monitoring services, we have got a complete package for you. Our highly qualified and competent team knows how to fill in cybersecurity gaps to provide a clear road map for a powerful and strong cybersecurity system.

    Empowering you by Reliable Cyber Security Solutions, Email Security Services, Alert Logic Log Manager, Managed Data Security Offerings, Onsite & Remote Internet Security Services, Threat Manager with ActiveWatch, Web Security Manager: Trust the Security Experts, Website & Web Application Protection

    ReplyDelete
  15. Great Content. It will useful for knowledge seekers. Keep sharing your knowledge through this kind of article.
    Power BI Training in Chennai
    Primavera Training in Chennai

    ReplyDelete
  16. You completed a few fine points there. I did a search on the subject and found nearly all persons will go along with with your blog.
    SEO Agency in Lahore

    ReplyDelete


  17. Such an interesting and informative piece of guidance imparted by you. I am glad to discover this information here and I am sure that this might be beneficial for us. LEARN More Our Services: how to invest in ipo online

    ReplyDelete
  18. 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.
    SEO Services in Lahore

    ReplyDelete
  19. This is grateful information for all of us to build any software or website but user also check this free trial of workshop management software.

    ReplyDelete
  20. Hii I really like your concept of
    software development
    this concept is really different and easy.
    thanks for sharing this article.keep it up

    ReplyDelete
  21. I was looking for some information about a Software Development and this blog is really impressive, I took best knowledge about coding, I should tell you that you have written really awesome article here. You put everything in detail and really easy and understandable.

    ReplyDelete
  22. Click this LINK

    Your work here on this blog has been top notch from day 1. You've been continously providing amazing articles for us all to read and I just hope that you keep it going on in the future as well. Cheers!

    ReplyDelete
  23. This impressed me so much amazing. Keep working and providing information
    activator

    ReplyDelete
  24. hello sir, This is a really good article. I recently discovered your blog. symptoms of sihr of separation.thank youvmix crack


    ReplyDelete
  25. I have been impressed with your work here on this blog since day one. As you have continued to provide us with amazing articles, I just hope that you can continue to provide them as well in the future. Thanks!
    Mirillis Action Keygen

    ReplyDelete
  26. hi sir, Wow really interesting article, may later be able to share other helpful information are more interesting. Thank you!MikroTik Beta crack

    ReplyDelete
  27. I wanna recommend this website to you. Please visit and you will get good information, Thank you for sharing good info. Cracksys

    ReplyDelete
  28. hello sir,I truly appreciate this post. I?ve been looking everywhere for this! Thank goodness I found it on Bing. You have made my day! ThanksWindows Service Auditor Crack

    ReplyDelete
  29. I’m glad that you just shared this helpful info with us. Please keep us informed like this
    Secure Eraser Professional

    ReplyDelete
  30. hi sir, Wow really interesting article, may later be able to share other helpful information are more interesting. Thank you AnyTrans for iOS Serial Key

    ReplyDelete


  31. Good Post. This is my first time i visit here and I found so many interesting stuff in your blog especially it's discussion, thank you.
    Driver Easy Crack patch

    ReplyDelete
  32. A very informative and knowledgable website.
    I really appreciate the article you shared with us.
    easyserialkeys

    ReplyDelete

  33. This was a wonderful read from you! It's all very interesting.
    Check out the new stuff you post by bookmarking it.
    Poweriso crack

    ReplyDelete
  34. Let's say you have a good blog. I really want to read more embarrassing.
    WinToUSb Full Crack

    ReplyDelete
  35. This was a wonderful read from you! It's all very interesting.
    Check out the new stuff you post by bookmarking it.
    DVDfab platinum crack

    ReplyDelete
  36. You provide a fantastic resource and you give it away for free.
    My favorite websites are those that recognize the importance of providing free resources.
    It is said that everything goes around and comes around again. Post more and keep us informed. Happy reading!
    Tenoshare 4ukey patch

    ReplyDelete
  37. It is the most popular crack software website for Mac users and Windows users worldwide.
    UCRACKS

    ReplyDelete
  38. hi, I found a lot of interesting information here. A really good post, very thankful and hopeful that you will write many more posts like this one. Thanks for sharing.
    crackpub

    ReplyDelete
  39. A very informative and knowledgable website.
    I really appreciate the article you shared with us.
    microsoft office

    ReplyDelete
  40. hi sir ,Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info great work https://activators4windows.com/2021/07/13/windows-11-activator-txt/

    ReplyDelete

  41. hi sir,Found your post interesting to read. I cant wait to see your post soon. Good Luck for the upcoming update.This article is really very interesting and effective thank you.
    Directory Monitor Pro Crack

    ReplyDelete
  42. Reduce Stress. Engage in healthy practices that naturally reduce stress. video thumbnails maker platinum crack/

    ReplyDelete
  43. PASSFAB FOR RAR CRACK content and information on the Post are excellent. For Mac and Windows users worldwide,

    ReplyDelete
  44. Thanks for this useful blog, keep sharing your thoughts...
    Unix Program
    Unix Applications

    ReplyDelete
  45. Thanks for sharing. Your blog is more informative. This is very nice article and very good information. We really enjoy your blog & content.
    geeks to you melbourne

    ReplyDelete
  46. Thanks for Sharing such an amazing article. Keep working... Your Site is very nice, and it's very helping us.. this post is unique and interesting, thank you for sharing this awesome information Simple Disable Key Crack

    ReplyDelete
  47. We strategize, design, and build best-in-class digital products, transform teams, and co-create disruptive business models. We work as technology innovation Web Application Development Services partners with our clients, helping them adapt and thrive in the digital era.
    Staff Augmentation Services

    ReplyDelete
  48. This post is so interactive and informative.keep update more information...
    Tally Course in Tambaram
    Tally course in Chennai

    ReplyDelete
  49. Hi!
    This is very well written and it's so interesting.
    This is so awesome.
    But you should also see this...
    This site provides free serial/activation codes and license keys.
    Tenorshare 4uKey Crack
    Tenorshare iCareFone for WhatsApp Transfer Crack
    VRay Next for SketchUp Crack

    ReplyDelete
  50. Thanks Admin For Sharing Your Great Ides. If you want to Download the Official Crack Then Click Here
    StudioLine Photo Pro Serial Key

    ReplyDelete
  51. Software Development: Session Replication / Clustering / Failover With Tomcat (Part 1 - Overview) >>>>> Download Now

    >>>>> Download Full

    Software Development: Session Replication / Clustering / Failover With Tomcat (Part 1 - Overview) >>>>> Download LINK

    >>>>> Download Now

    Software Development: Session Replication / Clustering / Failover With Tomcat (Part 1 - Overview) >>>>> Download Full

    >>>>> Download LINK GL

    ReplyDelete
  52. Amazing content you shared with us.
    Alteza is a leading Online Pharmacy App Development Solution organization and we address every concern of our clients by providing comprehensive online pharma apps for their business needs.

    ReplyDelete
  53. If you're looking for a custom software development company in Singapore, you're in luck! There are plenty of options available, and the quality of service you'll receive will vary depending on which company you choose.

    ReplyDelete
  54. Thanks for sharing this information.

    Apptians provides resources in technologies and stacks like PHPixie , FuelPHP and Laravel PHP , Phalcon PHP , and Symfony PHP .

    ReplyDelete
  55. Thanks for sharing this information.

    Apptians provides resources in JavaScript Technology and frameworks like , React Js and Angular Js , Vue Js , and Ember Js .

    ReplyDelete

  56. Thank you for this great information. It is a very helpful blog. Share More like this
    Tally Course in Chennai
    Online Tally Course


    ReplyDelete
  57. AWS(Amazon Web Services) is the best Cloud Computing platform
    used in various organizations for their business development.
    The main aim of the organization is to grow and make a profit
    through various services using aws cloud computing platform.
    It allows the organization to store all its data in the cloud
    without any physical space. This cloud computing platform allows
    the organization to access data more easily from anywhere using the internet.
    AWS Training in Chennai
    AWS Online Training
    AWS Training in Bangalore

    ReplyDelete
  58. microsoft office 2016 crack
    Microsoft Office 2016 is type of MS Office which help the users to write, modify and present the document.

    ReplyDelete
  59. This particular paper is fabulous, and My spouse and i enjoy each of the performances that you have placed into this. I’m sure that you will be making a really useful place. I have been additionally pleased. Good perform! book online shop

    ReplyDelete
  60. Thanks for sharing this's very informative blog. air cooler with compressor

    ReplyDelete