• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

load balancing & session management

 
Shrawan Bhageria
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all

pl. help me

how we maintain session management in case server load balancing.
pl. explain with example

thanks
shrawan

SCJP 1.4, SCWCD 1.4, MCP
SCBCD(preparing)
 
Paul Bourdeaux
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is going to be specific to the type of server you are using. An application server is not required to support distributed applications, but most do.

Basically, servers that support load balancing and clusters maintain session information in some type of datastore that each cluster machine can access. If a request comes into a machine, and its session exists on a different machine, the container will migrate the session to the machine servicing the new request.

The key point here is that there is only one session per distributed application, and the application server handles all of the migration for you. You can use an HttpSessionActivationListener if you want trigger events when the session is migrated.
 
stan ioffe
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also serialize session data onto a disk and allow a different machine reload that data. ... However, as mentioned above, it's server specific.
-stan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic