CertCities.com -- The Ultimate Site for Certified IT Professionals
Post Your Mind in the CertCities.com Forums Share share | bookmark | e-mail
  Microsoft®
  Cisco®
  Security
  Oracle®
  A+/Network+"
  Linux/Unix
  More Certs
  Newsletters
  Salary Surveys
  Forums
  News
  Exam Reviews
  Tips
  Columns
  Features
  PopQuiz
  RSS Feeds
  Press Releases
  Contributors
  About Us
  Search
 

Advanced Search
  Free Newsletter
  Sign-up for the #1 Weekly IT
Certification News
and Advice.
Subscribe to CertCities.com Free Weekly E-mail Newsletter
CertCities.com

See What's New on
Redmondmag.com!

Cover Story: IE8: Behind the 8 Ball

Tech-Ed: Let's (Third) Party!

A Secure Leap into the Cloud

Windows Mobile's New Moves

SQL Speed Secrets


CertCities.com
Let us know what you
think! E-mail us at:



 
 
...Home ... Editorial ... Columns ..Column Story Saturday: April 5, 2014


 Microsoft: Under the Hood  
Don Jones
Don Jones


 Why You Should Care About IIS 6
IIS 6 may seem similar to 5 on the surface, but it's what's underneath that makes this upgrade so important.
by Don Jones  
10/15/2003 -- Internet Information Services (IIS) 6 is one of Win2003's most-touted new features, but you may be asking yourself, "Who cares?" After all, IIS is IIS is IIS, right? What could Microsoft possible have added to make it better (or worse)? Heck, even the administrative interface looks almost identical to IIS 5, with the exception of some minor icon changes. Is it really that different? The answer, of course, is "absolutely!" This month I'll try to expose some of what's new under the hood in IIS 6.0.

All-New Architecture
Perhaps the most important under-the-hood feature is IIS' all-new architecture. To really appreciate how improved it is, let’s quickly review how IIS 5 and prior versions were built.

In previous versions of IIS, 100 percent of IIS' code ran in user mode. Windows, as you may know, has two basic memory spaces: user and kernel. Everything in user space is protected from everything else in user space, and most applications execute there. Kernel mode is reserved for the OS itself, device drivers and other low-level components. Kernel mode is very sensitive; in fact, many blue screen crashes come from poorly-written kernel mode software. In short, kernel mode has the ability to take down the entire machine. Of course, the benefit of kernel mode is pure speed: Nothing can access memory and system services as fast as software running in kernel mode.

IIS 5 also ran under a single memory space. This meant that IIS, any IIS filters (such as the filters that make Active Server Pages work), and any user code (such as ASP pages) all share a memory space. If poorly written code is executed, or vulnerability exploited, that entire memory space can be taken down, effectively crashing IIS.

So, in IIS 5, IIS would register with the operating system to receive traffic from ports 80 (HTTP), 443 (HTTPS), 20 and 21 (FTP), and so forth. The OS would hand traffic off to IIS, passing that traffic from the kernel mode TCP/IP driver to the user mode IIS code. IIS would then put the traffic into the correct virtual server, execute ASP code, and do whatever else was necessary.

Those were the old days. With IIS 6, everything changes. To start with, there's a new piece of kernel mode software: Http.sys. This driver, written by Microsoft, is responsible for receiving all IIS-bound TCP/IP traffic from the TCP/IP stack. Running in kernel mode gives the new driver a huge speed advantage, and the fact that only Microsoft-written code is in Http.sys should ideally make it as stable as possible. Http.sys never executes any code, such as ASP code, not written by Microsoft. This means any future exploits found in ASP, ASP.NET, or some other segment of IIS can't be exploited to crash kernel mode.

Http.sys' job is to hand off traffic to the user mode portions of IIS. All user-written code -- ASP, ASP.NET, etc. -- runs in user mode. So now, a poorly-written ASP page won’t necessarily crash the entire IIS server. Because Http.sys is separate and living in kernel mode, it's protected and the server will be able to continue processing traffic.

IIS provides memory segmentation for user mode, too, through the use of application pools. Each application pool (there's one by default, but you can create more) occupies a dedicated memory space. So if one application pool crashes, the others will continue to live, and will receive traffic directly from Http.sys. Each virtual server you create can be assigned to a specific application pool.

For servers running multiple Web sites, you can segregate each Web site so that one crashes site won't affect the other sites. Http.sys will deliver incoming traffic to the proper site (passed on destination port, IP address, and host headers). It's a great idea, under IIS 6, to assign each Web site to a separate application pool, provided your server has sufficient memory to support them all. That way, a single crashed site won't affect anything else.

Scalability
Each application pool is served by a single worker process, which can be defined as a single thread of execution, which processes all ASP pages, Web page requests, and whatever else your Web site handles. You can, however, configure an application pool to support multiple worker processes. When you do so, the application pool is referred to as a Web garden.

You probably are familiar with the term Web farm: It's two or more identical Web servers that balance incoming requests across them. To users, the servers appear to be one gigantic server, but to you they're a great way to create scalable Web sites. A Web garden is a similar concept, sort of a "Web farm within a server." When you create multiple worker processes for an application pool, IIS will load balance incoming requests across the available processes. If one process hangs, IIS can kill it automatically and try to restart it, thus keeping the Web site performance as high as possible. Because a lot of user code -- like ASP pages -- can contain memory leaks, IIS can also periodically recycle a worker processes, ending it and creating a new one to ensure that resource utilization is as efficient as possible.

With Web gardens, a single poorly-performing Web page -- say, a Web page that's executing a large query -- won't necessarily hand the entire Web site, because additional worker processes are available to handle other Web requests in parallel. You can configure all of these worker process options within the application pools you create (open up the IIS 6 MMC and you'll notice a new folder for application pools).

Security
IIS 6 is also supposed to be a brand-new way of thinking about security, and it really delivers on that promise. Prior versions of IIS had the goal of being as functional as possible "out of the box." IIS 6 isn't even installed by default. When you do install IIS 6, the default installation options provide you with an absolutely stripped-down Web server capable only of serving harmless, static HTML pages. If you want to offer ASP, server-side includes, WebDAV, FrontPage, or anything else, you'll need to install each of those options individually from the Add/Remove Windows Components control panel. The theory is that each of those components comes with its own security risks, and that you as the administrator are acknowledging those risks by explicitly installing the components. That's far better than Microsoft just plunking them all down without you even being aware of what's going on!
Http.sys itself also lends some basic security beef to IIS. For example, it conducts a brief examination of all requests, and willr eject requests with obvious buffer overflows, malformed packets, and so forth. Http.sys also checks with the file system on each request, and will discard any requests for pages that don't exist. This helps defeat certain types of Denial of Service (DoS) attacks, which request random, nonexistent pages from the Web server. Http.sys can ignore these requests with relatively little effort, rather than passing the request into user mode and forcing IIS to do something about it.

Worth Your While
From both an architecture, performance, and security standpoint, IIS 6 contains a lot of new features and designs under the hood. While the MMC might not look very different from prior versions of IIS, what's running on your 2003 servers is a redesigned, rewritten version of IIS that's intended to address most of the security, stability, and performance issues of prior versions. Upgrading from IIS 5 is usually a piece of cake, and IIS 6 even offers a backwardly-compatible "IIS 5 Process Isolation Mode" that forces IIS 6 to behave more like IIS 5. This setting can help you migrate complex Web sites that rely on IIS 5's specific memory and process management techniques.

To me, IIS 6 is one of the "killer apps" that will help drive Win2003 upgrades. Any NT or 2000 Web servers you've got will benefit from a 2003 upgrade. Microsoft even offers Windows Server 2003 Web Edition, which is a stripped-down version of Windows intended primarily as a platform for Web servers. It's a lower-cost version of Windows Server 2003 (the lowest, in fact) and gives you everything that IIS 6 will become famous for.


Don Jones is the owner and operator of ScriptingAnswers.com, a speaker at national technical IT conferences, and the author of nearly twenty books on information technology. His latest book is "Managing Windows with VBScript and WMI" (Addison-Welsey) and he's completing "Windows Administrator's Automation Toolkit" (Microsoft Press). You can reach Don at his Web site or at .

 


More articles by Don Jones:

-- advertisement --


There are 61 CertCities.com user Comments for “Why You Should Care About IIS 6”
Page 1 of 7
10/20/03: Anonymous says: If you want a more secure web server...just don't use IIS...period!
10/21/03: YES, GO APACHE says: To all the Unix naysayers out there that I've seen posting recently, have you ever heard of an Apache-based webserver being hacked? Unix is the best, whether it's Solaris or Linux, and it will remain that way for quite some time. Honestly, I think a lot of people are just plain fed up with Microsoft's arrogance. Microsoft products have such huge vulnerabilities and all they ever say, or have to say because our government is too weak to stop them, is "oops, sorry your company lost millions...now download such and such patch." At least unix engineers discovered problems on their own in the test stages of development.........
10/24/03: Anonymous says: You must be a moron...your actually sitting there saying Apache has never been hacked? Go back to sleep so you can rejoin your dream world.
10/24/03: To Anon 10/24 says: Ok, prove I'm wrong you little 15 year old. When has a catastrophic hacking of Apache happened?
10/26/03: Anonymous says: Here you go douche bag...if you like like to the hundred of other Apache security flaws please let me know I will post them, this is the first one I came across on google. http://www.securityfocus.com/news/493 so, please go find another place to spew your zealot lies. Just an FYI, I love Linux and Apache, but I can't stand when F'ing morons like yourslef post.
10/26/03: Anonymous says: Why don't you read the article in full dumbass!!! They didn't prove Apache on Sun was hacked. Why don't you learn to read and COMPREHEND DOUCHE BAG!!! Go back to sleep numbnuts....
10/27/03: Anonymous says: Hacking Apache on the MAC...http://www.macworld.co.uk/news/main_news.cfm?NewsID=4844
10/26/03: Anonymous says: Apache Worm from last year...http://news.zdnet.co.uk/internet/0,39020369,2118195,00.htm
10/26/03: Anonymous says: If you'd like to continue being schooled, let me know.
10/27/03: Anonymous says: Just so u know they removed the other 5 Apache Hacks I posted here.
First Page   Next Page   Last Page
Your comment about: “Why You Should Care About IIS 6”
Name: (optional)
Location: (optional)
E-mail Address: (optional)
Comment:
   

-- advertisement (story continued below) --

top