Slow performance Azure 'Web App' + Azure SQL DB

Viewed 1683

I've moved an existing asp.net web-api over from an Azure VM (with IIS and MSSQL installed locally) to an Azure web app and Azure SQL database (both west-europe). I'm noticing a dramatic increase in processing duration between the two for the same workload. Tasks that take 10-15ms on the VM, take at least 150ms in the hosted service environment. Both internal processing, not including network latency to/from the vm or web app. Both with empty databases and the same code-base. Same database schema with the same indexing.

The VM was a simple 2-core/7GB SSD machine. But even when I set my web app to a premium 4-core/7GB and my database to a premium 250DTU, the performance does not increase at all. In fact, its the same on a basic 2-core web app and 10DTU database. So the bottleneck has to be somewhere else.

How would I go about finding out what causes the slow processing? The web app and database show no performance alerts and don't advise scaling up either.

2 Answers

I faced the same issue today: Azure Web App with Azure DB resulted in slow performance on anything interacting with the DB.

However when I ran the app locally on my pc the experience was very fast. I therefore checked my app service and location. I was using S1 service located in the US with the database in Australia.

•I therefore upgraded to Premium S2 and

•Located my Web App and DB to be in the same region.

These two changes resulted in a massive performance increase.


Im not sure why having my previous answer be a duplicate is a problem if Im the original poster of the same answer on another question and and if the answer applies and is correct as is. It doesn't make sense to change it just because. Please comment first and allow me to edit before completely deleting...

Related