✅ Why do my ASP.NET Core Requests not run in parallel?
If I call the /slow enpoints multiple times in short succession, I can see that they are not processed in parallel. I can see that because they take longer than 5 seconds (except first one). This is confusing to me, as I would expect them to await the delay in parallel. Can someone explain why this is?
12 Replies
"Took 5125ms"
they run in parallel
on my pc at leastyes, this also runs parallel on my pc, but have you tried my example?
yes, I added that to your example
it calls your example
ahh, i see
my logs tell me the request took 5 seconds, but they clearly take longer
how are you measuring how long they take?
i start two requests at the same time and see if they finish at the same time, but one of the two take roughly double the time
hmm, if i test with your code it also takes 5000, it only happens if i send the requests with my browser
Does this answer the question?
Stack Overflow
Web api handles just 6 concurrent requests
I have a web api project using async/await controllers and tasks.
I've noticed every request after the 6th one gets queued. To test this, I made an easy delayed action:
[HttpGet()]
[Route("
the browser limits the amount of concurrent requests :p
yes, but i just open the url in 2 seperate tabs
ok, tested it with postman, they run in parallel
so it is a browser thing