Monday, June 7, 2010

Sharing view on process model process model:
We can devide request processing in 3 states.

State 1:
When a request arrives,IIS examines the resource type and calls into ASPnet_ISAPI extension.Later it will pass into the actual worker process(aspnet_wp.exe).If current process is already enabled (i.e it's working or serving a request), aspnet_isapi queues the request and assignes it the worker process later.

State 2:
After recieving a request,ASPnet worker process notifies the aspnet_isapi that "it is serving a request" .aspnet_isapi maintains state reference internally.When ISAPI recieves this message from process, it will mark status as "Executing". Each worker process can handle single request at a time.

It will use synchronous model,because as i already stated above worker process can't start processing request which is not yet marked as "executing" in the ISAPI internal table.

ASPNET_Wp also able to start new process, when suppose existing one consuming too memory, and responding too slowly.Also it can automatically assign pending request to existing other process.

State 3:

When finished,the response is sent to aspnet_ISAPI.the state of the request has been changed to "DOne" in ISAPI internal table.Later on request state has been removed from thae table.If worker process crashes,executing state in ISAPI will remains same. When aspnet_ISAI detects,that the proces is dead it will removes the sate from ISAPI and frees all the IIS associted resources.

No comments:

Post a Comment