We migrated an application from physical servers to Azure VMs (one web server, one database server), and it's running great for the most part.
Last night there was an outage caused when the web server went offline for some TBD reason, and when it came back up the connection string started failing... The errors were all of the network path not found variety.
I know a VM's internal IPs can change inside my affinity group, but I'm not seeing a lot of straight answers on which IP or name I should be using.
Right now my connection string looks like this:
Server=MyDatabaseServerName;Database=xxxx;User ID=xxxx;Password=xxxx;
I feel like maybe MyDatabaseServerName was resolving wrong to the wrong IP for awhile there, and that maybe I should be using my cloudapp.net name instead, like this:
Server=xxx.cloudapp.net, 1433;Database=xxxx;User ID=xxxx;Password=xxxx;
...But I'm concerned that will go all the way out to the internet and back in.
So what's the safest way to go here?