Azure – Latency Between Azure App Service and Azure MySQL Flexible Server

azureazure-app-servicesMySQL

I have an old ASP.NET MVC website I've moved to Azure that runs super slow on there.

I've set up:

  • App Service (Standard S1 plan)
  • Azure Database for MySQL flexible server (Burstable, Standard B1ms – 1Vcore, 2G mem, 640 iops).

The site is working but there seems to be a huge delay on connecting from the site to the DB then it suddenly springs to life.

  • The App Service is 'Always On'.
  • The DB connection is using SSL.
  • App and DB are in the same Azure region.

Admittedly, the site is quite old now but there is no scope to update it. It was running on a very expensive dedicated Windows server and was (obviously) much faster.

Are there any 'go to' things to check in this setup that could account for the slowness or is it more likely a matter of old obsolete/inefficient code is what it is?

I'm tempted to throw a little more power on the DB side but I don't know if that will make much difference.

Best Answer

The B1 SKU is a burstable VM, and a small one at that. It has 1 core, but when you are not bursting you are only getting 10% of that, which is not very much at all. If you use all your burst credits, or you reboot the VM, which resets the burst count, then you will be running at 10% of a core, nowhere near enough for MYSQL.

You need to increase the VM size.