For a few weeks I’m facing an issue where an application on an Azure VM has a slow network connection to an Azure SQL database. I’ve tried different tiers and SKU’s but the speed is just not there.
When the application is running, it can push about 250 to 500 kb/s to the database. As a comparison, the on-premises environment reaches about 4 MB/s. Now there a lot of differences that I don’t want to get into.
Because of these differences, I logged a call with Microsoft to find out what’s going wrong. We are suspicious about the network. So the first things we checked off were the private endpoint connections (making sure traffic goes straight to the database instead of taking the long way round) and accelerated networking was enabled on the VM. Even though the network interface of the private endpoint suggests you can enable it for a database, you can’t.
But Azure support came with an option that isn’t enabled by default, but should be the default when you check the documentation. The option is this:
The default uses some redirect policy, the redirect one establishes a direct connection to the node. Where can you find that? I found it a bit hidden. You need to go to your SQL Server that’s deployed on Azure. There you go to networking and select the third tab, connectivity.
I never thought about changing that one, but when you look at the documentation, you might find it useful. In my case, network speeds went up to 1 to 1.5 MB/s. Quite an increase but I’m not there yet. As mentioned above, there are a lot of others variables that come into play but at least we’re getting closer and, I’ve learned something that I can apply at more ‘instances’.
Thanks for reading and let me know your experiences or questions!