Relation between HTTP.sys request queue and IIS app pool

后端 未结 4 1015
既然无缘
既然无缘 2021-01-24 13:15

I read this from < IIS 7.0 resource kit >

HTTP.sys maintains a request queue for each worker process. It sends the HTTP requests to the request queue f

4条回答
  •  离开以前
    2021-01-24 13:36

    To discuss a paragraph in a book, you should give more info.

    This paragraph comes from "IIS 7.0 Core Components" section, and the version at Safari Books Online is different from what you pasted,

    HTTP.sys maintains a request queue for each worker process. It sends the HTTP requests it receives to the request queue for the worker process that serves the application pool where the requested application is located. For each application, HTTP.sys maintains the URI namespace routing table with one entry. The routing table data is used to determine which application pool responds to requests from what parts of the namespace. 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.

    So the last sentence should be understood as,

    • An application pool corresponds to one request queue within http.sys.
    • An application pool corresponds to one or more worker processes.

    Thus, your understanding of "HTTP.sys maintains a request queue for each worker process" is not correct. The correct one should be "HTTP.sys maintains a request queue for each application pool". So no matter how many worker processes are there for a single application pool, they only serve requests from a single request queue in http.sys.

    "For each application, HTTP.sys maintains the URI namespace routing table with one entry"

    I think it should be "for each application pool, HTTP.sys maintains the URI namespace routing table with one entry". This routing table makes it easier to dispatch requests (whose URL is clear) to the pools. Very similar to a hash table.

    The table can be constructed from tag in applicationHost.config, by combining sites, their bindings, applications, and their application pool association. There is no further information from Microsoft on the exact table structure.

提交回复
热议问题