IIS6 architecture model: Overview of HTTP. SYS, iis6http. sys
IIS6 architecture model: Introduction to HTTP. SYS
1. Overview
HTTP. SYS runs in windows Kernel Mode and exists as a driver.
It is part of the TCP/IP network subsystem of Windows 2003. In terms of structure, it is a network driver over TCP. Therefore, HTTP. SYS no longer belongs to IIS. It is independent from IIS.
Based on TCP/IP, the main functions of HTTP. SYS are:Listen to users' http requests(This request comes from TCPIP. sys driver), and forward the request to the relevant web application for processing. Finally, HTTP. SYS returns the processing result to the user (returned to TCPIP. sys driver ).
In HTTP. SYS, it consists of the following functional modules:
Ü listener module.
Ü response cache module.
Ü Request queue.
Ü response sending module.
The internal structure of HTTP. SYS is shown in the following figure:
2. HTTP. SYS response process to the request
HTTP. SYS listens to and receives the user's http request, and then responds to the user's http request. The procedure is as follows:
Data Request Process description:
First, the user sends an http request to the web application deployed in IIS through a browser.
After various processing, the http request will eventually reach the TCPIP. SYS driver, and TCPIP. SYS will forward the request to the HTTP. SYS network driver.
In HTTP. in SYS, its listening module always monitors whether there are any http requests to it on the network. When an http request arrives, the listening module will analyze the http request, these requests are queued based on different request types, waiting for the web application in the application pool to process the requests in the queue.
Here is a question: how does HTTP. SYS pass the request to the application?
In HTTP. SYS, it maintains a data configuration table, which records the correspondence between URLs and application pools. HTTP. SYS tracks URLs in http requests. That is to say, HTTP. SYS registers all IIS 6.0 applications and assigns a handle to each worker. IIS uses these handles to identify or register one or more namespaces used by the application.
Therefore, when HTTP. SYS receives an HTTP request,It quickly transmits request packets from HTTP. SYS in kernel mode to Web applications in the correct user mode..
If the application pool is not started after an http data request package arrives, HTTP. SYS starts the application pool. This processing method is also called request-based startup.
After an http request is processed, the result is returned to HTTP. in SYS, HTTP. the response sending module in SYS returns the processing result to TCPIP. SYS, and finally return to the user.
3. data cache by HTTP. SYS
If you make frequent http requests to some resources on the web site, HTTP. SYS caches the response results of this request.
When a user requests these resources the next time, HTTP. SYS directly sends the Response Results saved in the cache to the user. The process from sending an http request to returning a response result by the system is completed by HTTP. SYS in kernel mode.You do not need to switch between kernel mode and user mode, which greatly saves system resources and increases the request response speed..
Shows the HTTP. SYS data cache process:
4. HTTP. SYS configuration information
HTTP. as a network driver, SYS has been separated from IIS and is no longer part of IIS. Therefore, HTTP. SYS configuration data is stored in the registry rather than in the IIS configuration database. In the Registry, the registration information of HTTP. SYS is located in the following path:
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/HTTP.
5. Other HTTP. SYS Functions
Manage TCP connections
Verify HTTP Request
Logs of Web websites in IIS
Implement the bandwidth limit policy
And supports TCP/IP-level management.
Implement customer certificate request service