简体   繁体   中英

How to increase the number of processing HTTP requests?

I have ASP.NET Web API app (backend for mobile) published on Azure. Most of requests are lightweight and processed fast. But every client makes a lot of requests and do it rapidly on every interaction with mobile application.

The problem is that web application can't process even small (10/sec) amount of requests. Http queue growth but CPU doesn't.

I ran load testing with 250 requests/second and avg response time growth from ~200ms to 5s.

Maybe problem in my code? Or it's hardware restrictions? Can I increase count of processed requests at one time?

少数活跃用户的统计信息

Http请求队列

CPU和内存

First it really matters what instances do you use (specially if you use small and extra small instances), how many instances do you use - dont expect too much from 1 core and 2Gb RAM on server.

Use caching (WebApi.OutputCache.V2 to decrease servers processing efforts, Azure Redis Cache as fast cache storage), Database also can be a bottleneck.

If you`ll have same results after adding both more instances to server and caching - then you should take a look at your code and find bottlenecks there.

And thats only general recommendatins, there is no code in a question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM