Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1102279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:09:42+00:00 2026-05-17T01:09:42+00:00

I have been researching the implications of setting up a distributed session environment, and

  • 0

I have been researching the implications of setting up a distributed session environment, and wanted to ensure I was not missing any major points.

With respect to developing apps that will run in a distributed session environment, the main development issue I have identified is the loss of data that may be kept in the session. Obviously everything would have to be serialized or converted to stateless (or a combination of both) which could be a significant undertaking for any apps already coded for heavy session use.

Are there any other potential issues or implications I should be aware of?

Edit: To be more specific (and as an example), I’m referring to Java web application server-side sessions in a servlet container environment.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:09:43+00:00Added an answer on May 17, 2026 at 1:09 am

    Do you have reference to the precise definition of “distributed session” you have in mind?

    I think your idea is that there’s a client (e.g a browser) and a server (eg. a servlet engine) and the Session state is distributed in the sense that the responsibility for the session is distributed between client and server – so for example the client must send a particular cookie with every request and the server must identify which session belongs to which client.

    There are fundamental problems that need to be solved: consistency, reliability and scalability, by having session state you make one, or the other, or both difficult.

    Simple case: The server persists the state to a database after every requests. Quite reliable, but expensive (DB write every time), Quite scalable, can have many copies of the server. Application developer must make sure the state can be persisted – that often means that Classes need to be Serializable. And if you put lots of stuff in the session it gets expensive!

    So keep it memory: let’s not persist the session, keep it in memory. That performs better at the expense of reliability, now if we lose the server we lose the session. And we need to make sure that every request from a client goes to the same server instance, so scalability is tricky. We can’t simply offload requests to other server copies, they wont have the session.

    So distribute the session: some app servers have clever distribution schemes to pass the session to other instances. Often this is thought to be cheaper than a DB, in practice it may not be. Once again the app developer needs to make the session serializable. Usually you still need good client/server affinity so you hit the same server most times, this results in less session copying.

    Often what we really need to do is get selective. Not all of a session is important. We’d hate to lose a shopping cart, but the list of what we just looked at? Suppose that list was just a bit out of date would it matter.

    Hence my general recommendation: Don’t use session state for things you really care about, don’t use session state as a general dumping ground. By and large developers are much better at putting things into a session than they are at tidying up again. Large (more than a k or two) persistent sessions are a severe problem.

    So as a rule of thumb: persist important stuff to a db, consider putting some stuff in a cookie (effectively give responsibility to the client), put into the session only stuff that can be easily recreated. Then you can just rely on simple session affinity, and no persistence/distribution between server instances.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been researching asynchronous messaging, and I like the way it elegantly deals
I have been researching and playing with functional programming lately, solely to broaden my
I have been researching options for printing report-like data via a web application. Some
I have been researching audit triggers for some of my sql tables. I came
I have recently been web-researching quantum computing. Will we see these in our lifetimes
I have been researching this one for awhile. I found several resources on the
I have been researching about the headless browsers available till to date and found
I have been researching, SQL Server 2012 (aka Denali) and Microsoft has a pre-release
Okay, I have been researching on how to do this, but say I am
I have an assignment to develop a web application firewall. I have been researching

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.