impact of heavy session objects

Posted on 2006-03-31
Last Modified: 2010-04-01
in my web application(java,jsp,struts,tomcat,oracle) the user is needed to add records as many as he wants,and later he can view these records with an option to modify these records.

Now when the user add a records i m storing these records in session object one by one and there is a final Commit button on which i perform database the time of view i fetch all records from database, put in session object and display on the screen.

If user wants to update any records he can click on any hyperlink(for each record there is hyperlink with a unique key against records in session),now this particular records is available for editing. the user update this records and old record in session is removed and this new one in added and again there is a final commit button on which i get the data rom session and perform database operation.

This application is for multiuser environment,now i want to know the impact of heavy session object in my application because there could be hundreds of records in session and any suggestions in case of  application performance degradeation.

Question by:riteinfotech
    LVL 23

    Expert Comment


    Author Comment

    u mean heavy session doesn't effect application performance at all.....................??????????????
    LVL 23

    Expert Comment

    i am not 100% sure but i feel it is so because all those objetcs will be retained only till that session & later will be trashed so may have any major effect.

    Thank You.
    LVL 11

    Expert Comment


    If you store big object in every user's session and you get more hits say 1000 hits within a span of time...u can see how big it will be. If you are writing a high traffic internet app that needs to scale you will want to keep session scoped objects to a minimum.

    If you are planning on getting a small  amount of traffic from a small amount of users (intranet app) than
    storing objects in session can make your life very easy.  

    LVL 29

    Accepted Solution

    I tend to agree more with fargo. I have actually seen a web server brought to it's knees by overuse of sessions although this was dealing with 30,000 users within 20 minutes but well planned and "hygenic" use of sessions can actually improve performance dramatically as you are not repeating wasteful database connections

    But also remember this; A large object to be stored in the session may be 60K so storing 1000 sessions at 60K (plus a bit for session overhead) would give you around 65 MB of session data held in the servers RAM. As many servers have up to 2/4 GB of RAM this is actually not that large so it would be feasible.

    Basically it boils down to your architecture, your user base size and the hardware you'll be using.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    For Sennheiser, comfort, quality and security are high priority areas. This paper addresses the security of Bluetooth technology and the supplementary security that Sennheiser’s Contact Center and Office (CC&O) headsets provide.  
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now