Monday, July 21, 2008

IIS Compression

There are three ways of doing IIS compression:

Static files only
Dynamic application only
Both static files and dynamic application

Why compression is required?

Compression is required for faster transport of data, as amount of data transfered will be less and to get faster user experience in case of low bandwidth. So we can say compression is required for speed and bandwidth.

How compression works?

When a request reaches to IIS, it checks whether the browser from which it got the request has compression-enabled or not.Then, it checks for kind of compression is enabled, i.e. static files or dynamic application.

IIS caches the compressed static files only, if it is already cached, IIS sends the compressed file to the requested browser. If IIS doesn't find the compressed version, it sends an uncompressed version of the requested file and in background it compresses the requested file for subsequent use.

In case of dynamic application(e.g aspx or asp), IIS doesn't cache it. It compresses the response as request reaches and sends response to the client.

Evaluating HTTP Compression

If application consists lots of dynamic content, we need to check few things to reach to decision whether to implement HTTP Compression.

If % Processor Time counter is higher than 70%, enabling HTTP compression is not recommended. If your server has multiple processors, you need to check the individual processors % Processor time.

Follow below link to know how to IIS compression

Using HTTP Compression

Happy Coding :)

No comments:

Site Meter