The server has the following configuration:

  • Processor: 2 Intel L5520, 2.27 GHz, Cores: 4, Threads: 8
  • RAM: 24 GB
  • OS: Windows 8.1 (к сожалению клиентская ОС)
  • IIS: 8.0

The application is built on ASP.NET MVC, 500 accounts are created.

Day 1

At 8:00, all 500 users had to log in and download the file.

 <a href="~/Files/РУ_2_кл_Ключи.doc">РУ_2_кл_Ключи</a> 

At this point, the site began to slow down and eventually completely "sat down."

There were many offers on the network and all of them mainly concerned the optimization and tuning of the IIS server.

I have no experience administering web servers, I always focused on coding - I thought setting up servers was a secondary responsibility of a programmer-developer. And so I tried to solve the problem using asynchronous controllers (although in the application there are only 2 controllers) . And it did not give results.

One of the first IIS settings I made and what had the effect was to increase the maximum number of simultaneous requests in the application ( appConcurrentRequestLimit ):

cd% windir% \ system32 \ inetsrv

appcmd.exe set config /section:system.webserver/serverRuntime/appConcurrentRequestLimit:20000

The site immediately sighed and the users seemed to be able to download this file. Has ceased to slow down. And it seemed to me the problem was solved.

Day 2

Today again at 8:00, all users rushed to download another file and the same situation.

I increased the appConcurrentRequestLimit to 90000 - to no avail.

Now, although there is no time for this, I sit and study the architecture of IIS . Everything is so confusing. What should I do? So far there is little that I understand from the read.

  • What does it have to do with asynchronous controllers? Do you have a controller, the file gives? - Pavel Mayorov
  • What is the size of the file? What's up with the network - gigabit, 100 megabits? - Pavel Mayorov
  • The @PavelMayorov file is not big - only 500 KB . True Internet channel is small - 20 Mbit - Adam
  • 500 kilobytes * 500 users are 250 megabytes. At 20 megabits, this should all be transmitted for about two minutes ... Do you have 20 megabits there - is this a guaranteed speed, or can it also sink? - Pavel Mayorov
  • @PavelMayorov on this line, we have the whole organization too (35 computers). They are limited to 1 Mbit. While there is no separate channel on the server. But at 8.00 the whole network was at the disposal of the server. - Adam

1 answer 1

For a start, increasing appConcurrentRequestLimit useless. If you have 500 users, then a value of 500 is enough so that they all can simultaneously download the file. Well, better than 1000, so that there are 2 requests per user. 90000 is a lot for your tasks.

In the default configuration, IIS should be able to cope with this, in general, insignificant load. Therefore, we must look for what is wrong with the server.

First of all, we must look, of course, throughput of the channel. If you have an outgoing channel of only 5 megabytes, then with a file size of 500 kilobytes, it will be completely clogged for 8-10 minutes until all files are downloaded. Opening the main page at this time can be really difficult, because the connection will have to compete for resources with 500 others.

In order for the main page of the site to continue to open while files are being downloaded, it is necessary to somehow limit the download speed so that the entire channel is not clogged. You can try to make the controller for the slow return of the file ...

But IIS has built-in functionality . Unfortunately, it can only be included for the entire site, so you will need to transfer files to a separate site. Further, in the IIS settings, enable the bandwidth limit of 4 megabits - and 1 megabit for your main site remains free.


But you can make it even easier. Just upload your files to any file cloud - Yandex.disk, google-disk, dropbox, etc. In all of them, you can customize access to files.

If you are a supporter of non-standard solutions - you can use torrents. Create a torrent, register open trackers as trackers, and upload torrents to the site. You will also need to run a torrent client on the server to distribute files.