views:

753

answers:

2

What is the exact relationship, in IIS7 and ASP.Net, between :

  • IIS Worker processes
  • Threads
  • AppDomains
  • Applications
  • incoming requests

I'm hoping for an answer in a format similar to :

"Each IIS worker process hosts many appdomains which each spawn a single thread in response to each request...." etc. , and any nuances mentioned.

Thanks in advance.

+1  A: 

Each worker process hosts several AppDomains (at least one per ASP.NET app, i.e. a Website or Virtual Directory). An incoming request is assigned a thread from thread pool when it comes.

Mehrdad Afshari
So each appdomain owns and manages its own thread pool?
Thenon
Each managed Thread is always assigned to a single AppDomain at a time. The worker process maintains a shared thread pool and it's assigned to a specific AppDomain for the duration of a request.
Mehrdad Afshari
+1  A: 

Fritz Onion's book Essential ASP.NET has a chapter on HTTP Pipeline where he talks about relationship of all of the above during http request.

dev.e.loper
Thanks, but this seems to be for IIS5, and also doesn't mention threads as far as I can see.
Thenon