Hacker News new | ask | show | jobs
by pjerem 1697 days ago
That’s a false issue nowadays. Basically any cheap router supports Avahi/Zeroconf/Bonjour … and allows you to reach any other machine of the network directly by its host name instead of its IP. There is not any reason to learn the IP address of your first MySQL server when you can reach it through « mysql-1 » or « mysql-1.local ».

You basically just need a router and an OS from the last two decades and your machines to have a defined host name (which your OS installer takes care of).

2 comments

I don't think that's true. I've never seen a router that lists hostnames that I can actually ping. Sometimes they do but 50% is always empty. It's a very client dependent solution.
> Basically any cheap router supports Avahi/Zeroconf/Bonjour … and allows you to reach any other machine of the network directly by its host name instead of its IP.

I regularly run into instances where local hostname resolution is unreliable.

To improve reliability, I setup a local DNS server to hand out a domain name with the IP address. Even then, whether a client requires a hostname or FQDN to resolve a local address - that can vary over time.