title: How HTTP.sys forward request to worker process
body: <p>I wanted to get an <em>overview</em> of the way HTTP.sys forwards request to work process in IIS 7.0 and above. For that purpose I read the post at <a href="http://www.iis.net/learn/get-started/introduction-to-iis/introduction-to-iis-architecture" rel="noreferrer">http://www.iis.net/learn/get-started/introduction-to-iis/introduction-to-iis-architecture</a>. However, there are two points in this post that seem to be contradicting and is confusing me.</p>
  
  <p><strong>Point 1:</strong> 2nd bullet point mentioned under section "Hypertext Transfer Protocol Stack (HTTP.sys)" is as follows.</p>
  
  <p><em>Kernel-mode request queuing. Requests cause less overhead in context switching because the kernel forwards requests directly to the correct worker process. If no worker process is available to accept a request, the kernel-mode request queue holds the request until a worker process picks it up.</em></p>
  
  <p><strong>My conclusion according to this point is as follows:</strong>
  HTTP.sys forwards request "directly" to worker process bypassing the WWW service. In case no worker process is available, HTTP.sys queues the request in kernel-mode request queue while WAS service starts a new worker process. This worker process then picks up requests from the kernel-mode queue on its own.</p>
  
  <p><strong>Point 2:</strong> Process Management subsection under the section "Windows Process Activation Service(WAS)" is as follows.</p>
  
  <p><em>WAS manages application pools and worker processes for both HTTP and non-HTTP requests. When a protocol listener picks up a client request, WAS determines if a worker process is running or not. If an application pool already has a worker process that is servicing requests, the listener adapter passes the request onto the worker process for processing. If there is no worker process in the application pool, WAS will start a worker process so that the listener adapter can pass the request to it for processing.</em></p>
  
  <p><strong>My conclusion according to this point is as follows:</strong>
  HTTP.sys forwards request to the worker process "through WWW service" as that is the listener adapter. In case no worker process is available, HTTP.sys queues the request in kernel-mode request queue while WAS service starts a new worker process. The request from the kernel-mode queue is then picked up by WWW service and forwarded to the worker process.</p>
  
  <p>Could anyone please let me know which of my above two conclusions is correct? If both are incorrect, please let me know the right flow.</p>