We have a working deployment of a production site using Azure.
We used Azure VM's to deploy a VM with SQL installed and a separate VM to run as the web server.
From our web application we connect to the SQL Database on the other VM by using the DNS name of the VM in our connection string.... something like :
Data Source=<Our SQL VM>.cloudapp.net
So this is great, it's working... but I'm not sure it's the best way / fastest / most efficient.
Given that both VM's are running in the same data centre can we connect directly using the internal / local IP of the VM rather than using the full DNS / public name?
I don't know a lot about IP... is the process smart enough to do something like "oh, hey, I can see that public IP for your SQL VM is in the same data centre, I'll go directly to it!!!"... or is it not quite like that, is there a really inefficient
process happening with our current set up where all our SQL traffic between our web server is going all the way out of the data centre into the public internet and then back down into the data centre.
If there is a penalty and it's a really small penalty then we probably won't bother changing anything (don't know about the static IP side of things, our VM's are installed as Vanilla / non expert installs).... but if it's hammering our performance or data
costs or something like that then we'd definitely change things.
Thanks for any advice :-)