We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

IIS best configurationRSS

5 replies

Last post Jun 19, 2020 02:42 PM by Rovastar

  • IIS best configuration

    May 13, 2020 02:14 PM|ecerroaragon|LINK

    Hello, I would like you to help me find the best configuration for my IIS 8.5 and my .NET MVC application.


    I have a load balancer with 5 web servers and a sql server (app session info is saved in the sql server). In all the ws I have the same configuration for IIS (approximately 200 pools with 5 sites per pool), all sites of all the pools use the same folder since it is a single application that is used under different bindings.
    Someone thought this was the best option, but it brings me many problems to manage it (Locked requests, high CPU load, slow application).

    I would like you to recommend me what is the best option I have.

    Other data of interest:
    - The average amount of request per hour 150k per ws.
    - The number of users or connections in rush hour is 300 (65 per ws).
    - Every ws has 8 cores and 64GB ram (this is dynamic since I use AWS and I can change it according to demand)

    Thank you

  • Re: IIS best configuration

    May 14, 2020 02:15 AM|Jalpa Panchal|LINK


    Application pools allow you to isolate your applications from one another, even if they are running on the same server. This way, if there is an error in one app, it won't take down other applications.

    Additionally, application pools allow you to separate different apps that require different levels of security. The primary concern of using the Application pool is to isolate two different applications with different security concerns and also to avoid crashing of applications due to worker process death.

    So in opinion use, different application pools for the different sites is a batter option.

    you could also limit your application pool CPU usage:

    1)Open IIS Manager.

    2)Expand the local server and click Application Pools.

    3)Find the application pool you wish to limit and right-click on it.

    4)Click Advanced Settings.

    5)Under the CPU section, set "Limit (1/1000 of %)" to the amount of CPU you wish to be the maximum, multiplied by 1000. (ex: 25% would be 25000)

    6)Set Limit Action to Throttle or KillW3wp.


    7)Click OK to apply.

    and if you want to troubleshoot the issue you could try to use the  Debug Diagnostics tool.




    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
  • Rovastar Rovastar

    5495 Posts



    Re: IIS best configuration

    May 14, 2020 03:28 AM|Rovastar|LINK

    I am going to give completely different advice.

    Why are you not using just 1 application pool here?

    Normally you will use 1 app pool per site like Jalpa suggested however you say that it all "sites" use the same code.

    For me they are not different sites at all and you have 1 site just 1000 different unique bindings in there.

    If it is how I think it is it is what I would call a wildcard or whitelabel site. Normally for these you have 1 site and loads of bindings in there or just link to IP so you can have unlimited user sites.

    I run one of these will over 1 million registered user "sites".  like user1.mysite.com or user1000000.mysite.com

    I don't have separate pools or  sites or even bindings for each. That would be crazy. Obviously the code reads the subdomain in and knows that when you connect to user992821.mysite.com you want the site and info of user992821 

    Are there specific code dependencies on in each web.config that means you need a seperate site? That seems a crazy way to do it if it is and is obviously not very scalable.

    Troubleshoot IIS in style
  • Re: IIS best configuration

    May 14, 2020 11:55 AM|ecerroaragon|LINK

    Exactly, the folders of all the sites point to the same source code (this code resolves to which database to hit, there is one per site), each site has its binding and as I said before, they are grouped into sets of 5 sites per pool. Surely, for lack of IIS configuration, they decided to create multiple pools instead of creating a web garden or something similar.

    I don't have any code dependency in the web.config.

    The scenario you mention is practically the same as the one I have, can you tell me how you configured the iis to support the load of so many users?


  • Re: IIS best configuration

    Jun 18, 2020 02:48 PM|ecerroaragon|LINK

    can someone else help me?

  • Rovastar Rovastar

    5495 Posts



    Re: IIS best configuration

    Jun 19, 2020 02:42 PM|Rovastar|LINK

    I would run what I can under 1 worker process / app pool.

    I don't see any reason not too.

    You servers don't seem very busy. You should easily be about to cope with 65 ppl on your servers at once.

    You should be about to do thousands.

    Overall you will need to look at why things are slow or you. often this is the db bottleneck but look for slow running pages and optimize them.

    Online tools like stackify and leansentry will help too.

    Troubleshoot IIS in style