After migrated from AWS to Azure, API response became very slow
Solution 1:
This can happen for a variety of reasons, not necessarily VM related. The best way to find this out is to add logging / profiling to your app, so you can see where, exactly, is the bottleneck. I would add logging, at least:
- When the request arrives to the server
- When a DB query begins
- When a DB query ends
- When the response is returned to the client This will give you an indication about where the problem is.
In addition - did you look at the machine's metric? What's the CPU and RAM utilization?