What's the point in running an HTTP server as a kernel driver?

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
Surely this can't be a good idea.

But, apparently core parts of IIS are kernel drivers.
 

Rilex

Senior member
Sep 18, 2005
447
0
0
http.sys is not IIS. They're seperate components completely.

Performance is one reason...
 

stash

Diamond Member
Jun 22, 2000
5,468
0
0
Speed, stability and security.

http.sys does not execute any non-Microsoft code, ever. Also, since the server is separated from the usermode code that the actual sites run in, a crappily written web-app won't crash the whole web server.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: Mark R
Surely this can't be a good idea.
But, apparently core parts of IIS are kernel drivers.

Its a trade off done for performance reasons, one of the reasons that IIS scales as large as it does.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: Rilex
http.sys is not IIS. They're seperate components completely.
Performance is one reason...

And thats not really a fair statement. http.sys exists as part of the architecture change in IIS splitting it into kernel and user mode peices.
 

Rilex

Senior member
Sep 18, 2005
447
0
0
Originally posted by: bsobel
Originally posted by: Rilex
http.sys is not IIS. They're seperate components completely.
Performance is one reason...

And thats not really a fair statement. http.sys exists as part of the architecture change in IIS splitting it into kernel and user mode peices.

It is completely fair.

HTTP.SYS and IIS are not built by the same teams. HTTP.SYS is not dependent on IIS existing (you can run a site w/o IIS having been installed via HTTP.SYS).
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
It is completely fair. HTTP.SYS and IIS are not built by the same teams. HTTP.SYS is not dependent on IIS existing (you can run a site w/o IIS having been installed via HTTP.SYS).

While it's minor point, you are wrong. It doesnt matter that the same teams don't develop both, http.sys came directly out of the redesign work done by the iis team. I know, I was on campus for the iis design review when the plan was first discussed years ago.

You are correct that you can have a web site running without IIS, as http.sys providers the low level shared components. IIS is one implementation ontop, others can provide their own. However the reverse is not true IIS REQUIRES http.sys which is in opposition to your statement that "They're seperate components completely".

Basically the original iis listner was re-written as a kernel module and that peice moved to the core os team.

From MSDN:

"If application isolation is the first part of the robustness story, the second part is kernel-level queuing. IIS 6.0 HTTP service (http.sys) is where all incoming HTTP requests first hit the Web server. The kernel-mode HTTP service is also responsible for overall connection management, bandwidth throttling, and text-based logging. Http.sys implements a URI response cache. By implementing a cache, the service handle caches HTTP responses completely in kernel mode with no transition to user mode, thereby greatly improving performance. The URI namespace mechanism implemented by http.sys is called application pooling (recall the Application Pools node on the IIS Snap-in shown in Figure 2).
Each application pool has its own request queue within http.sys. Http.sys listens for HTTP requests and puts them on the appropriate queue. Because no user-mode code runs within http.sys, it remains unaffected by the type of code that would normally cause the host process to crash. Even if an accident happens within the user mode request processing infrastructure, http.sys continues to accept and queue requests until either there are no queues available, there is no space left on the queues, or the W3SVC has been shut down."

Bill