CertCities.com -- The Ultimate Site for Certified IT Professionals
Listen, See, Win! Register for a Free Tech Library Webcast 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 Thursday: January 14, 2010
TechMentor Conferences


 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 29 CertCities.com user Comments for “Why You Should Care About IIS 6”
Page 2 of 3
10/29/03: To Mr Dum-AS- says: You still haven't gotten the point or "taken anyone to school." Like I stated, where is the proof that Apache running on a Sun has been attacked with any success? I could give a crap less about Macs...do you even know that Sun is a hardware vendor? Jeesh!
10/30/03: Anonymous says: Uh dopey, the hacks I posted were removed from the site....can u read...Your post talks about APACHE, I don't give a rat's ass about SUN, Sun is done my friend and they can be hacked like anyone else...seriously are u dense...there are people out there that can hack anything...get it?...Listen dopey I quote from your moronic post "have you ever heard of an Apache based web server being hacked?" These are your words dumbass...get a clue and admit you don't know jack.
10/30/03: Jerry from Atlanta says: Apache has been hacked many times and has flaws as does most software...I do admit Apache is way more secure than IIS though.
10/30/03: Sun isn't done says: Sun's done eh,what planet are you on. http://biz.yahoo.com/prnews/031028/sftu111_1.html ..........http://biz.yahoo.com/prnews/031028/sftu122_1.html......http://www.theregister.co.uk/content/61/33665.html......http://www.sun.com/smi/Press/sunflash/2003-10/sunflash.20031027.1.html?AssociateId=NEWS67.....BACK TO SCHOOL WITH YOU AMIGO!!! Oh, I'm still waiting for evidence that Apache on a Sun product has been hacked. If you're such a hacking guru, why don't you do it and let me know.
10/30/03: Anonymous says: U must be retarded...that is the only thing I can figure. Listen you F'ing moron...I AM TALKING ABOUT APACHE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! F-bomb SUN I don't give a crap about SUN...Screw SUN....SUN can bite me...I AM TALKING ABOUT APACHE you freakin retard...R u that stupid that u can't figure this out? HUH? Apache can be and has been hacked OK! End of story. Go back to stocking the shelves at Walmart and shutup already AMIGO....MKAY.
10/30/03: Becky Nagel from Editor, CertCities.com says: That's enough guys -- I want this thread to get back on track. Feel free to take it to the forums and post to your heart's content, but no more on the back and forth here. Thanks!
10/30/03: You still haven't proven my point says: I'm still waiting. The above answer is not suitable enought. The funniest thing is that I forced you, Mr Gullable, to actually go and look up something for me:) Who's the F'ing more...chachacha:)
10/30/03: Anonymous says: Oh I am so distrought I actually typed 3 words into google, boy was I duped. Sorry Becky I won't respond to the cada de chocha anymore. Adios Amigo!
10/30/03: YES, GO APACHE says: We win again...:)
11/3/03: Anonymous says: I just found your posts. Just for your information, I hacked all kinds of web servers-iis, apache,sun,solaris,linux e.t.c............
First Page   Previous Page     Next Page   Last Page
Your comment about: “Why You Should Care About IIS 6”
Name: (optional)
Location: (optional)
E-mail Address: (optional)
Comment:
   

top