I've been load testing our site recently and noticed that the browser page load time in Azure's Application Insights suffers a great deal when ramping up the number of concurrent users. The page scores highly in GTMetrix tests (96% performance, 76% structure) and loads within 2 seconds in isolation.
During the test, the average page load time increases to around 5/6 seconds but the 95th percentile can be from 10s up to 25s. I've checked the obvious things like CPU, Memory, Database etc in Azure and all of these are well below being maxed out.
The test which was run was 187 concurrent users (22 second wait time) over 4.5 minutes.
When looking into the slowest requests, most of them have messages like '47.40% of this request was spent in waiting'... This doesn't point at any particular piece of code, it's different per each request so potentially suggests some kind of blocking?
Is this potentially an issue with the number of requests being made? Or simply the efficiency of the code? Or something else...
I'm curious as to what can affect the load time of a page client side and what can be done to improve this with an increased load?