MaxConnections in Azure Web App?

I have an Azure web application that I suspect runs in the maximum connection limit (i.e. the maximum number of HTTP requests that can be active at the same time).

  • How to change the maximum number of concurrent web requests in Azure Web Application?

  • Is there a way to monitor connection queues in Azure?

+7
source share
3 answers

The first thing to check: are you using static HttpClient? If not, I would first fix this and then re-run the load test.

In short, you do not need to change the maxconnection settings. The maximum is set by the .NET version, and this is a very, very large number. If you suspect that you are running out of sockets, you should run a load test and measure the number of SocketExceptions exceptions.

Since we are in the topic of resource limits, you are also using asynchronous calls. In particular, asynchrony in your WebAPI controller up to every dependency in your code base.

private static HttpClient Client = new HttpClient(); 

It is recommended that you use HttpClientFactory to control the lifetime of HttpClient instances, as described in https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http -requests .

+3
source

The load test result does not match the http request number limit in the web application, it simply indicates that the load test tool simulates these requests per second. The test result may be affected by the simultaneous customer number, App service plan level, number of instances and URLs, etc.

Here is the test result (web application with S1 application service plan, 250 simultaneous clients, URL on a static html page)

enter image description here

CPU and memory usage

enter image description here

From the above screenshots, we could find that it just uses a little CPU and memory resources during the load testing. And the result of 226.49 req / sec is not the actual maximum number of queries that the web application can process.

Also, if the App Service plan you are using now cannot meet the requirements of your application, try scaling up the App Service plan .

+1
source

you can check web application restrictions here. Increases the size of the web application help? https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits#app-service-limits

You can also use application information and new relict extensions in a web application and track incoming traffic and get into a bottleneck.

0
source

Source: https://habr.com/ru/post/1260953/


All Articles