Changing raw IP to FQDN in connection strings - any potential issues?

  • Our setup

    I have a small hosting setup consisting of an SQL Server (2008), a couple of webservers and an application server. They are not part of any domain - just a bunch of totally separate machines (but on the same switch).

    The problem

    We are currently using the server IP in the connection strings on the web and application servers. This is not optimal in case the server crashes needs to be rebuild with a different IP (or for some other reason needs to change IP).

    Possible solution?

    What I thought I'd do is use a FQDN instead (e.g. sqlserver.mydomain.com). This has some potential issues:

    - One more thing that can break (the DNS resolution)

    - There might be a slight performance hit due to the DNS resolution (though probably theoretical)

    - There would be a delay when changing the DNS-record due to TTL.

    To mitigate this I thought I'd add the FQDNs to the "hosts file" which should be the equivalent of a NETBIOS name (afaik - not my area of expertise).

    That way I would have name resolution that did not depend on an external DNS-server and the ability to instantly change the DNS. The "real" DNS-record would simply be a fallback for machines that did not have the "hosts" entries or e.g. had forgotten to re-add them after a hardware replacement.

    Are there any gotchas with this method? (issues with Windows or SQL Server). Or is there a better way to accomplish this for our kind of setup?

  • Sounds pretty solid to me.

  • Thanks NJ.

    If anyone have tried this in a real-life production environment I would appreciate a short "yes - and it works" or "no - it ended in a major catastrophy" 😉

  • Yes this work perfectly fine and have been running for more than 3 years by now. Only thing that we must ensure is that TTL on the local adapter is set to higher values and every time there is a change in the backend server IP. the related systems /flushdns needs to be done.

    Regards,
    DK-

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply