Reducing overhead by using off-box session modes
If you use session state on a server farm, you probably use StateServer or SqlServer mode rather than InProc mode, because requests coming from the one visitor may be processed at different servers.
This means that when a request starts being processed, ASP.NET retrieves the current session state from the StateServer or the SQL Server database, and de-serializes it so that your code can work with it. Then, towards the end of the life cycle of the page, the session state is serialized again and stored in the StateServer or the SQL Server database. As part of this, ASP.NET updates the last update time of the session, so that it can expire the session if it hasn't been used for too long. If you use SqlServer mode, this all means two trips to the database per request.
A few ways to reduce all this overhead are discussed in the following sections.
Reducing trips to the database
You can reduce the number of trips to the database by setting EnableSessionState...