I have a system based on NopCommerce hosted on Azure VM (Standard F8s_v2 size). The application runs pretty smooth. Average response times are around 200 ms which is acceptable. Very same application was hosted on Azure App service (P2v2 plan). It is noticeably slower. Average response time is around 500 ms.

I did tons of monitoring profiling:

* CPU on both Azure App service and VM is low. A single request gets CPU at around 5% on App service and around 3% on VM.
* Upgrading App Service plan has zero effect.
* There are no memory usage spikes neither on VM nor on App service
* IO is close to non-existent on both VM and App service.
* Both VM and App service got their own databases. Both of them were swapped when trying to figure out details of this behavior. No difference in behavior.
* All resources are on hosted on the same region.

Nothing really suggest this being a resource related performance issue on App service.

I got this profiler trace when profiling App service:



I also used miniProfiler to diagnose the problem with no success. The comparison of calls to identical endpoints on VM and AppService:



What could be causing this slowdown on App Service? What else is worth checking that would provide any hints on why response times are different?