/    Sign up×
Community /Pin to ProfileBookmark

Session handling in Clustered Server

Hello,

In Load balancing seniorio we have multiple hosting servers and applciation resides in every server.

How many ways we can do session handling?

Which is the best way to maintain the sesssion handling?

Thanks in Advance,
Mangesh

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogMar 23.2009 — Using the database to store session data may be the most scalable approach (assuming the multiple servers all share the same DB server?).
Copy linkTweet thisAlerts:
@skatsevMar 23.2009 — Most of the mid-and-higher end load balancer vendors (I work for Coyote Point but this is general) can do cookie-based session persistence for web applications.

Basically, the load balancer inserts a special cookie in the stream from the server, and then uses that cookie when the client comes back to put them on the right server.

That way, your application doesn't need to share data between servers, as long as that data is not very long-lived. For example, this works very well for ecommerce shopping cart environments. However, if you need something really long-lived, you wouldn't want to rely on the load balancer (cookies expire, people come back from a different computer, etc). In that case, you probably do want to have a single back-end database that all of the servers connect to.
×

Success!

Help @joshi_mangesh spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...