|
Putting an apartment threaded object into the session object. This article is a response to a question on the dev-asp list by a member. Question: If I put an apartment threaded object into the session object, IIS ensures that all future requests for ASP pages for that user are serialised via a single thread. How does the so called "locking down" of that session effect my application ? Response: ( George V. Reilly - MS/IIS performance guy ) Here's an analogy I like to use about "locking down" an ASP session to a particular ASP worker thread. It's like going to a supermarket and paying for your purchases at checkout stand #3, and forever after, always, always paying at stand #3, even though the queue at the other checkout stands might be much shorter or non-existent. It's much better to join the shortest queue. If the server isn't busy, it probably doesn't matter. If the server is busy, then you probably have a number of sessions locked down to each worker thread. Not only does your session have to wait for its thread to become available, there are probably several other sessions ahead of you in the queue which are also locked down to the same thread. Another consideration: Scaling out to a webfarm is much harder if you rely upon session state. Contribute to IDR: To contribute an article to IDR, a click here.
|
|