Click here to Skip to main content
15,918,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
dear friends,

any one guide me if i have hosted website on two web servers let suppose

1) server A
2) server B

first time request of a user is responded by Server A

Next time same user request is responded by Server B.

so in such a situation how sessions are uniquely identified by web servers?

any help would be appreciated.

1 solution

You have two options:

1) Session In Process, each server keeps the session state in the ASP.NET Process) with Session Affinity - All requests with the same session ID are handled by the same server.

2) Session out of process - Session is handled by a session server, could be sql server or any other implementation, can be slower but it's a good scalable solution.
Share this answer
Manfred Rudolf Bihy 1-Jan-11 12:02pm    
Exactly what I would have proposed.
Good call! 5+
mr_muskurahat 2-Jan-11 2:29am    
so in multiple web server case as i discussed above inproc mode will not be used?

and out proc will be used right?

and manages unique identification at web server level its self?
Shani Natav 2-Jan-11 3:47am    
Out proc is the way the go, the session ID is created per web server, but gets attached as cookie to all following requests, so it won't matter what server handles all the requests from the same session, the Session ID will be the same.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900