Introduction on IIS 7



Introduction

IIS 7 (Internet Information Services) is a web server software from Microsoft which is released after IIS 6.0 with many architectural changes and functional changes. The IIS 7.0 release in Windows 7 aims to provide the best architectural foundation for the next-generation Web application platform, focusing on the right core architecture, extensibility, and management platform for the Web server. This article just summarizes all the new key features available with IIS 7 like architectural changes, new configurable options, performance improvements, high extensibility and so on. IIS 7 is a vast topic which cannot explained in a single article, this article mainly focuses on
the new key features.

Protocol Listener - Http.sys is the protocol listener which listens for http, https requests and sends to IIS for processing and then returns the response to the client. In earlier versions Http.sys listens only to http and now it supports SSL too.

World Wide Web Publishing Service (www service) and Windows Process Activation Service (WAS)

Unlike earlier versions now the www service functionality is now divided into two components, www service (itself) and the other is WAS service. Now www service functions listener Http.sys based on the configuration information and once receives the request, notifies the WAS for processing. Www service also collects the performance counters for the web sites. WAS on receiving the request, reads the global configuration information, application pool configuration, site configuration and application configuration and based on the data the related protocol listeners are configured. In IIS 7 WAS manages application pools and worker processes for both http and non-http protocols. In earlier versions of IIS managing of worker process and pools was done by WWW service.

IIS 7 Modules

In the new architecture of IIS, we can customize IIS by adding or removing components or modules based on the requirements. That means we can remove unnecessary modules on the IIS and also we can customize the existing module by replacing the existing modules with our own modules.

Application Pools

In IIS 7, we can configure the application pool by using a configurable setting whether to process the request using Integrated mode or Class mode. In earlier version the setting was on server level and now it is on application pool level. So we can run different applications simultaneously using different process modes on the same server.

Modular Web Server

In architectural view IIS 7 server is subdivided into different modules and each module as its own functionality which paves the path for pluggability. We can unplug the modules which are unnecessary which decreases the deployment burden, reduces the surface attack and also improves performance by executing only the required code. We can also replace existing modules by developing our new module using the public extensibility APIs. In this way we can enhance the server features using the flexibilities provided by the architecture.

The new Configuration System

IIS 7 has come up with new hierarchy of configuration system through which we maintain server level configuration data on applicationHost.config file and application level configuration data with in the application's directory structure in web.config files.

E.g.:

<configuration>
<system.web>
... </system.web>
<system.webServer>
...
</system.webServer>
</configuration>

The benefits with this new configuration system are comprehensive control for server administrators, changing only required configuration files as per the business needs, easy deployment and this enables application to set configuration directly in their application without requiring any external help.

Improved Administration tool (MMC Snap-in)

IIS 7 administrative tool comes with rich UI compared to earlier versions, the new administrative tool makes administration simple by sub dividing management into different tasks. Using the new tool we can also monitor servers operations. Another important feature is the administration is also accessible remotely by the owners of the websites. That server administration is delegated to application owners now and this tool is also extensible to allow custom management. A new command line tool appcmd.exe is also introduced so administration can do some important administrative tasks like read/write configuration data, fetch site and application pool state information, configure sites and application pools, list active worker processes and so on.

The New Administration API

IIS 7 provides new Programmatic API Microsoft.Web.Administration to manage the server from .Net Applications. Using this new API we can programmatically access information of the server such as access state and diagnostic information, Configure the server, know active worker processes, running requests and access IIS configuration data. So we can manage the server using .Net applications.

Web Server Modules Development

The new modular architecture of IIS 7 provides the flexibility to build the new feature and replace the existing module. This is the salient feature available with the new architecture. Using the extensibility API which provides request processing services on IIS we can develop the new modules and add or replace the existing ones. The new API simplifies many complex request processing tasks, such as response buffering, authentication, and preparing response data for the client. So In this way we can customize the web server and extend the web server.

Asp.Net Integration

We can develop custom modules required for request processing using Asp.Net and extend IIS 7 web server. This means that existing ASP.NET services like Output Caching, URL Rewriting, and any others provided by your custom ASP.NET modules can now apply to any content type which is not possible with earlier versions of IIS.

Security Enhancements

Using the IIS 7 with minimal features by removing the unused features or modules reduces the server attack surface area. If any module is error prone to server attack and you are not using that feature, just unplug it. This is one advantage of the new modular architecture introduced in IIS 7. URL authorization is the new feature introduced which allow or deny access to URLs within your application based on user names and roles.

Improved Diagnosis

Troubleshooting is made easy in IIS 7 with the new features introduced; the new features are we can monitor the health of application using API provided and know the information like active worker processes, view currently executing requests, view the active state of sites and application pools and we can also manage server by starting, stopping sites and recycling application pools. All These new features help us to identify where the request has been abandoned, and which request is causing the performance overhead. IIS 7.0 provides detailed error information about most errors, telling you exactly what went wrong, why, and how to fix it. The detailed error pages are also now localized, offering the error description in the preferred language of the client, if the language pack for the corresponding language is installed.

Another new feature in IIS 7 is Failed Request Tracing using which we can enable tracing only for failure requests and for request which are taking more time to execute leaving other successful request to run normally. IIS 7 also adds additional events to log the trace information which contains useful information about each stage of request processing which simplifies diagnosing what actually went wrong.

Performance Improvements

Since IIS 7.0 is a modular architecture, we can turn on only the required modules which improves the throughput of the application and performance of the machine. The other importance key performance factor is IIS Output Cache through which we can re-use expensive responses of dynamic content. Compared to the ASP.Net output cache, the IIS output cache is more efficient.

IIS 7 continues to provide compression features like Static Compression and dynamic compression. Using static compression we can compress the static and save it on the disk, the subsequent requests utilize this compressed output and get the advantage of lessening bandwidth costs. Using dynamic compression we can compress the response which uses only five percent of CPU utilization. We can also configure to cache the compressed response and reuse it for subsequent requests.

IIS 7 output cache is newly introduced and is an alternative to ASP.Net output which caches the dynamic content for application frameworks like ASP.Net and PHP. By implementing IIS 7.0 Output Cache, you can achieve improvements of up to several orders of magnitude in overall throughput of your application and a matching reduction of load on your database and business tier components.

Converting ISAPI Code to IIS 7.0 Modules eliminates the overhead of the ISAPI compatibility layer and unlocks performance benefits that are not available for ISAPI components.

The IIS 7 modular architecture provides the flexibility to remove the existing feature and replace our own modules so that we can design module suitable to our application and machine configuration. In this way we can improve the performance of some specific modules.

Conclusion

The key features of IIS 7 include modular architecture, the performance improvements, changes in the configuration system and high extensibility.

The main aim of this article is to provide a summarized list of the new key features introduced in IIS7 and brief explanation of each.

References

1. http://learn.iis.net/page.aspx/101/introduction-to-iis-7-architecture/
2. http://weblogs.asp.net/scottgu/archive/2007/04/02/iis-7-0.aspx
3. http://msdn.microsoft.com/en-us/magazine/cc163453.aspx
4. http://mvolo.com/blogs/serverside/
5. http://learn.iis.net/page.aspx/244/how-to-take-advantage-of-the-iis7-integrated-pipeline/