Thursday, February 10, 2011

Using an Asynchronous Controller in ASP.NET MVC

The following just sounds interesting to a dumb web developer!

From: http://msdn.microsoft.com/en-us/library/ee728598.aspx

How Requests Are Processed by the Thread Pool

On the Web server, the .NET Framework maintains a pool of threads that are used to service ASP.NET requests. When a request arrives, a thread from the pool is dispatched to process that request. If the request is processed synchronously, the thread that processes the request is blocked while the request is being processed, and that thread cannot service another request.

This might not be a problem, because the thread pool can be made large enough to accommodate many blocked threads. However, the number of threads in the thread pool is limited. In large applications that process multiple simultaneous long-running requests, all available threads might be blocked. This condition is known as thread starvation. When this condition is reached, the Web server queues requests. If the request queue becomes full, the Web server rejects requests with an HTTP 503 status (Server Too Busy).

No comments:

Post a Comment