Performance Optimization Techniques In IIS Server

Nowadays, better web application performance is a crucial job from a business perspective. Everyone expects web applications to be user-friendly, secure, better performing, and with a good look and feel. So, in this article, I am going to show you a few IIS server performance optimization techniques. Once you apply them to your IIS server, I am sure that you will feel the difference as compared to the current performance of your applications.

Technique 1. HTTP Compression

When you enable this technique, the HTTP response (in both, static and dynamic content) will be compressed first and then the compressed response will be sent to the end user. With this technique, you can utilize the complete bandwidth in a better way. It results in faster data transmission between the IIS server and the browser.

To enable the HTTP Compression, follow the below steps

Step 1. Press Windows Key + R and type INETMGR

Step 2. You will find an option called Compression. Double-click on that.

Compression

Step 3. Here, you will get a different window where you can find the options with checkboxes, like the following.

  • Enable dynamic content compression.
  • Enable static content compression.

Select those items. For reference, please see the below screenshot.

Items

Technique 2. Web page Output Caching

As we know, Caching is a great performance improvement technique in the web application. When one end-user requests one web page and receives the response, then the complete response will be cached in the output cache. If the second user requests for the same page, then the cached response will be served to the second user instead of reprocessing the request.

Please refer to this link to configure the Output Caching in the IIS server.

Technique 3. Disabled the Client-side and Server-side debugging

In general, we enable the debugging feature in the development environment, which is recommended and a good practice too. This helps us test our code and make sure that everything is working as expected. We have to debug both the client-side and the server-side code. It helps us identify and fix the bugs, quickly. Whereas in a production environment, it is not recommended or good practice to enable this feature. It causes a lot of performance issues. If you disable this feature in a production environment, then you will get a little performance boost in your application.

Please follow the below steps to disable this feature in the IIS server.

Step 1. Press Windows Key + R and type INETMGR

Step 2. You will find an option called ASP. Double-click on that.

ASP

Step 3. When you double-click on ASP, you will get a different window where you can find the following options.

  • Enable Client-side Debugging
  • Enable Server-side Debugging

Make the above items False. For reference, please see the following screenshot.

Items false

Technique 4. Disable IIS Logging

As we know, whenever the end-user performs any action in a web application, the request is processed and responded back to the end-user. From receiving the request to giving a response, the IIS server keeps track of the following points.

  • From which IP address the request is received.
  • How much time was taken in processing the request?
  • Size of the response.
  • Cookies.
  • Error details etc.

let's say, you are maintaining a separate component called the Logger module, to track all the information. In that case, I believe IIS server logger details are no longer needed. In such a scenario, you can disable the logger feature in the IIS server, which will result in a little performance boost.

Please follow the below steps to disable the Logging IIS server.

Step 1. Press Windows Key + R and type INETMGR

Step 2. You will find an option called Logging. Double-click on that.

Logging

Step 3. You will see a window where you can find the Disable option. For reference, please look at the below screenshot.

Disable option

Technique 5. Increase Threads per Processor

This defines the maximum number of requests that can be processed in parallel. In IIS Server, the default value for threads per processor is 25. It means that the IIS server can process 25 requests simultaneously. If you want to increase its limit, then you can increase it to <= 100 which is recommended.

Please follow the below steps to increase the limit.

Step 1. Press Windows Key + R and type INETMGR

Step 2. You will find an option called ASP. Double-click on that.

ASP

Step 3. In the next window, you can set the limit. See the following screenshot.

Screenshot

Technique 6. Increase Queue limit

In most cases, you might receive the IIS Server response, like “Server too busy” with status code 503. The reason behind this is that when the IIS Server receives too many requests, this error occurs. Even you will receive such errors when the queue capacity is very small. Increasing the queue capacity is in your hands. If you increase the queue capacity, it will boost the performance a little.

Please follow the below steps to increase the limit.

Step 1. Press Windows Key + R and type INETMGR

Step 2. You will find an option called ASP. Double-click on that.

ASP

Step 3. In the next window, you can find the Limits Properties option. If you expand it, then you will get the Queue Length option where you can set the limit.

 Limits Properties

Technique 7. HTTP Expires Header configuration

This option helps you minimize the number of requests to the IIS Server. The HTTP expiry header helps the client browser cache the web pages and its elements, like CSS, images, etc.

Please follow the below steps to set the HTTP Expires.

Step 1. Press Windows Key + R and type INETMGR

Step 2. You will find an option called HTTP Response Headers. Double-click on that.

HTTP Response Headers

Step 3. Once you double-click on the HTTP Response Headers, you will get a window where you can find the X-Powered-By option. If you right-click on it, it will give you the Set Common Headers option. Click on that. It will give you one pop-up window where you can set the HTTP expiration in a number of days or hours. Please find the below screenshot for reference.

HTTP expiration


Similar Articles