CrazyCoder
CrazyCoder

Reputation: 2388

How many requests can a Web API handle concurrently by default

I have a very simple Web API developed in c# .Net framework 4.6.
There are no async calls in entire application. Each request takes around 30 seconds to complete. It does some calculations and returns a JSON string. There is no database involved in this.It just downloads a file from cloud and calculates some values.

It is hosted in Windows Server 2016 , IIS .

I want to know how many concurrent requests does Web API or IIS handle at a given point of time.

I know that no of concurrent requests can be increased from web.config like this:

<configuration>
  <system.net>
    <connectionManagement>
      <add address="*" maxconnection="50000"/>
    </connectionManagement>
  </system.net>
</configuration>

Here are some questions I have which I'm sure are very basic.
1. Does Web API has the capability by default (without adding anything in web.config or anywhere in the application) to handle concurrent requests. If yes, how many?

  1. Does IIS has the property to handle concurrent requests (using IIS Thread pool) by default. If yes , how many?

PS: Assuming that all the resources which this API is using are always available.

It would be very helpful for me if someone can help me understand this and direct me to right articles. Many thanks in advance!

Upvotes: 5

Views: 14239

Answers (1)

MysteriousLab
MysteriousLab

Reputation: 394

It depends, IIS can return requests based on number of CPUs, max number of threads, amount of memory installed and "difficulty" of operations needed to generate a response.

If IIS cannot handle a request at any time, that request is queued. I think max number of queued requests is 9000. After reaching that limit, server returns 503 error.

Depending on hardware factors with the "weight" of response it may vary from 100 request to 50000 or even more.

That is all considering you have enough bandwidth available.

Upvotes: 4

Related Questions