Say I have SQL Server installed on a server with an IP of 10.1.2.3. If I have a process running on that server that wishes to connect to the db it can use either:
- 10.1.2.3,1433
- localhost,1433
- machinename,1433
The third option will incur slightly more overhead because it needs to lookup DNS each time correct? But what of the other two options? For all intents and purposes are they identical?
Obviously IPs can change, but localhost is always localhost so that is a benefit for that option, but on the other hand IP can be used from any machine within the network, localhost only on the server itself so that's a benefit for using IP. But I'm solely concerned with speed/performance/reliability/overhead, etc