Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is and why use Session Mode : SQL Server Mode?

I want to know in which situation i am use this mode ?

like image 322
Hitesh Avatar asked Feb 03 '26 21:02

Hitesh


2 Answers

Sql Server Mode is one way to handle sessions inside of a web farm for example. If you were to use in proc session state inside of a web farm, you would not be able to share a session over many boxes. Using Sql Server for the storage of the session means that you can load balance your users over the servers inside of the web farm and the session can be retrieved externally, inside of SQL Server. So one web server would allow you to use in proc session state. With many servers you need to store the session state in a common place so all web servers can see the same one.

like image 83
REA_ANDREW Avatar answered Feb 06 '26 11:02

REA_ANDREW


It's mainly used when you want to use your app on a web farm, web garden, or cluster. Since page requests can come from multiple processes or computers, you can't use an in-process session state provider.

http://idunno.org/articles/277.aspx

like image 30
Dave Markle Avatar answered Feb 06 '26 11:02

Dave Markle



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!