-
HTTP Protocol Stack (IIS 6.0)
The HTTP listener is implemented as a kernel-mode device driver called the HTTP protocol stack (HTTP.sys). IIS 6.0 uses HTTP.sys, which is part of the networking subsystem of the Windows operating system, as a core component.
Earlier versions of IIS use Windows Sockets API (Winsock), which is a user-mode component, to receive HTTP requests. By using HTTP.sys to process requests, IIS 6.0 delivers the following performance enhancements:
• | Kernel-mode caching. Requests for cached responses are served without switching to user mode. |
• | 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. |
Using HTTP.sys and the new WWW service architecture provides the following benefits:
• | When a worker process fails, service is not interrupted; the failure is undetectable by the user because the kernel queues the requests while the WWW service starts a new worker process for that application pool. |
• | Requests are processed faster because they are routed directly from the kernel to the appropriate user-mode worker process instead of being routed between two user-mode processes. |
For information about improvements made to HTTP.sys for Windows Server 2003 SP1, see the HTTP API in Windows Server 2003 SP1 white paper.
fonte: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/a2a45c42-38bc-464c-a097-d7a202092a54.mspx?mfr=true
-
How HTTP.sys Works
When you create a Web site, IIS registers the site with HTTP.sys, which then receives any HTTP requests for the site. HTTP.sys functions like a forwarder, sending the Web requests it receives to the request queue for the user-mode process that runs the Web site or Web application. HTTP.sys also sends responses back to the client.
Other than retrieving a stored response from its internal cache, HTTP.sys does not process the requests that it receives. Therefore, no application-specific code is ever loaded into kernel mode. As a result, bugs in application-specific code cannot affect the kernel or lead to system failures.
HTTP.sys provides the following services in IIS 6.0:
-
How HTTP.sys Handles Kernel-Mode Queuing
When IIS 6.0 runs in worker process isolation mode, HTTP.sys listens for requests and queues those requests in the appropriate queue. Each request queue corresponds to one application pool. An application pool corresponds to one request queue within HTTP.sys and one or more worker processes.
When IIS 6.0 runs in IIS 5.0 isolation mode, HTTP.sys runs like it runs in worker process isolation mode, except that it routes requests to a single request queue.
If a defective application causes the user-mode worker process to terminate unexpectedly, HTTP.sys continues to accept and queue requests, provided that the WWW service is still running, queues are still available, and space remains in the queues.
When the WWW service identifies an unhealthy worker process, it starts a new worker process if outstanding requests are waiting to be serviced. Thus, although a temporary disruption occurs in user-mode request processing, an end user does not experience the failure because TCP/IP connections are maintained, and requests continue to be queued and processed.
fonte: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/a2a45c42-38bc-464c-a097-d7a202092a54.mspx?mfr=true
-
Confiabilidade e escalabilidade
O Windows Server 2003 oferece os recursos a seguir para proporcionar uma confiabilidade e uma escalabilidade aprimoradas.
Novo controlador em modo de núcleo, HTTP.SYS: O Windows Server 2003 introduz um novo controlador no modo kernel, o HTTP.SYS, para a análise e o cache de HTTP, melhorando a escalabilidade e o rendimento. O IIS 6.0 foi criado sobre o HTTP.SYS e está ajustado especificamente para aumentar o rendimento do servidor da Web. Além disso, o HTTP.SYS processa diretamente solicitações no kernel, sob determinadas circunstâncias.
Fonte:Technet