Live data from Hacker News

Hostnames

seriss.com

121–130 of 187 posts

Re: Hostnames

#121

After working in a few pretty large environments I have some pretty strong opinions about hostnames. I've seen everything from cute theme based names to function/role based names to meaningless uuid based names. Usually you see the theme based names in much smaller environments, though I've seen it up to hundreds of machines. One problem I have with this approach is that people begin to personify machines, excusing t…

[deleted]

Re: Hostnames

#122
For sports fans -- historic player names for a particular team. Like the Phillies.. ashburn, bunning, carlton, dykstra .... incaviglia.

Re: Hostnames

#123
post #69
post #30

We used to use Marvel characters until our setup got too big. Now it's (datacenter)-(type (web, proxy, db, etc))(number). So, sfo-proxy1, for example.

Outgrowing Marvel characters is a sign of good growth. Marvel says they have 7000 characters, and that count might exclude characters that just had one minor appearance.

We reached a point where it was just becoming painful to keep track of them - what a server did and where it was located. When you only have a handful of machines at one location, it's not a big deal. But once that number grows, and especially if spans multiple data centers, cute or geeky naming schemes tend to fall apart.

"Wait, was Magneto the master DB or the NFS server? Did we move DB off there? Is it in Atlanta, or San Francisco, or Phoenix?"

Eventually we reached a point where we had a spreadsheet mapping hostnames to architecture functions and physical locations. We realized that, even though our naming scheme was cool, it wasn't going to scale much further.

Re: Hostnames

#124

After working in a few pretty large environments I have some pretty strong opinions about hostnames. I've seen everything from cute theme based names to function/role based names to meaningless uuid based names. Usually you see the theme based names in much smaller environments, though I've seen it up to hundreds of machines. One problem I have with this approach is that people begin to personify machines, excusing t…

The hostnames I develop with are like "imdopsjpl741", difficult to remember. I prefer names like "rover" and "elephant" but can understand how that could be worse for the server farm ops people.

Re: Hostnames

#125
post #53

Periodic table: hydrogen, helium, lithium, beryllium, boron, carbon... and shorthands... h.yourcompany.net, etc... :)

This is my favorite one. For extra awesome, you can use the atomic mass of each element as the last octet of the device's IP address.

Re: Hostnames

#126

location-service-type-number accting-ws-01 email-server-01 building1-upstairs-switch-01 eastgroup-noc-router-01 Why go cutesy when you can actually define what they do and where they are?

Perhaps the question 'how do you name your servers?' should be added to tech interviews, the more cutesy the response, the less mature/experienced the interviewee possibly is (i.e. having not been burnt by the obfuscation of such as scheme)?

The users of the servers need never be burnt by the cutesy names and can remember them easier. So it seems not so clear cut what's better all things considered, especially as the ratio of users to operations folk increases.

Re: Hostnames

#127

After many, many nights spent tracking down servers named after: Indian food dishes (30 of em! "where is jalfrazie?") Great US mountains (ugh.) 'win2003' the Sun box (ugh again. don't name the box after the OS running on it...) ...i'd say my favorite was 'appname-colo-number#-rackunit#-rack#.airportcode.yourdomain'. This way, the db server in your new york colo JFK1 is easily found in rack unit 20 of rack #5 (db01-20…

I can see mapping physical location to hostname being a problem though, especially in a virtual environment.

Even if you're not doing any of that, it only takes one move and you have to rename your systems, a process that is varying degrees of tricky.

Re: Hostnames

#128
post #101

After working in a few pretty large environments I have some pretty strong opinions about hostnames. I've seen everything from cute theme based names to function/role based names to meaningless uuid based names. Usually you see the theme based names in much smaller environments, though I've seen it up to hundreds of machines. One problem I have with this approach is that people begin to personify machines, excusing t…

One of my biggest pet peeves is when people name a host after a product, say 'mysql-prod-101', then later they decide to switch from MySQL to Oracle. I worked in an environment where a number of hosts contained 'tomcat' in the name but they were all running weblogic. Better to name based on the role, as you say, so the mysql-prod-101 would be better named db-prod-101. However, I've come to think that nowadays with co…

Ya, all our dev tools servers are named after the product they're running. (Well, most of them; one is named after a mythological being; one is named after its function.) As a user, this is frustrating because rather than remember what function I'm trying to access (e.g. mail, wiki, bugs, etc.) I have to remember what Atlassian decided to name their product that implements the function I want.

(Fortunately some entires in /etc/hosts + a local Apache server set up with RedirectRules fixes this annoyance, at least for myself…)

Re: Hostnames

#129

Earlier quoted context omitted.

If you're repurposing the machine anyway you might as well totally wipe and reprovision it, right?

Definitely. But why add the overhead over updating DNS/DHCP?

To always start with a clean environment. Who knows what crud is leftover.

A new job for a machine calls for a new OS install/etc.

Re: Hostnames

#130
What is a hostname for?

We have IP addresses. They are unique numbers that will always resolve to one unique machine, on which a network service exists that we want to talk to. We use the hostname to refer to the unique instance, and a URI's protocol name to refer to the service we want.

smtp. ntp. www. ftp. These are all short names that work great at expressing both what and where the service you want is, under your domain. But what if you have more than one? is it www2? ntp4? ftp3? which host/service do I want?

Context is everything. Your hostnames should be a representation of what you want to access, assuming a service with a default port. Instead of www2, www-devel. Instead of mysql255, mysql-qa-dev-ext. These are contexts that are specific to what you want, not just random identifiers you can use to pinpoint an exact thing.

Renaming hosts is a pain. It should be minimized, which is why CNAMEs are useful. If you can, try to give teams DNS control over the records pointing to the hosts they manage, so they can control them without waiting for the DNS admin to put a change through in a week. Make DNS changes work automatically and immediately (trust me, it's perfectly doable even in large environments). In most cases, you don't really need a host's name changed, you just need a CNAME to the new host you want to use.

Post reply on HN