I have an ASP.NET Core system (based on NopCommerce framework) 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:
Nothing really suggest this being a resource related performance issue on App service.
I got this profiler trace when profiling App service: App service profiling
The application has built in profiling, implemented with MiniProfiler. The comparison of calls to identical endpoints on VM and AppService can be found here: VM vs App service profiling
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?
The actual problem of this the way application as hosted. Project settings would use outdated AspNetCoreModule as well as hosting model. Forcing it to use ASP.NET Core 2.2 new inProcess hosting model resolved the issue. If you are interested in more intricate details of why it runs faster you could read this