Live data from Hacker News

Hostnames

seriss.com

71–80 of 187 posts

Re: Hostnames

#71
At my university, we had a small Beowulf cluster set up for when what we wanted was to play with distributed processing (there was another, much more powerful and better managed, cluster for jobs that actually needed to get done). Naturally, we used names of kings and heroes from Beowulf.

Re: Hostnames

#72

Cute naming conventions are fun when you're small and have no intention of growing the network. If you're planning to scale, you may as well start with practical names that give some context for the location and purpose of each box. Your team have more important things to remember than which country mario lives in and whether pluto is an app server or a database.

I agree, and even if you're small I think having more sensible names is probably a better sign of 'maturity'. On my home network I'm moving back to naming new devices and VMs by type and purpose (e.g. server01, raspberry01, htpc01) rather than continuing the naming convention I had.

Re: Hostnames

#73
I've used roman emperors (caligula, augustus, nero, otho, etc.).

Also notable is that of my ISP - they use words ending in “less”, for example: “priceless” is the accounting system, “thankless” the support ticket system and “clueless” the customer login.

Re: Hostnames

#76

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)?

Re: Hostnames

#78

We use Pokemon. There's something super memorable about Blastoise, Slowbro, Squirtle, Ninetales, Jigglypuff... I also color my tabs the color of the Pokemon for fast reference.

We do as well. The NAS is Snorlax, the GPU server is Pikachu, and the workstations are Eevee and Vulpix. I would have named the printer Ditto but apparently IT has a policy on printer names.

Re: Hostnames

#79
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 their behavior. "Oh that's just akira being akira." This is counter to actually understanding and diagnosing problems. You're also relying on potentially faulty/emotional memories rather than having an actual stored account of issues. Not to mention, once you have a sufficient number of machines you're going to need a decent service database to know what runs what anyways.

Function/Role based names are what I have the most historical experience with. CBS Interactive, CNET, YouTube, and Dropbox all went this route. This often seems like a great idea and can get you really far. Most configuration management allows you to define classes/nodes/etc based on regular expressions. Sudoers has built in support for hostname globbing. It's also easy to tell what a machine's role is when you get an alert. So why wouldn't you want to go this route?

This method has some pitfalls that become increasingly burdensome as you grow into a larger amount of machines. You might have many types of services that run on a single hardware class. This introduces overhead whenever you need to update a machines role. Imagine it's Saturday and your mobile-web pool is suddenly under provisioned. Well, we have plenty of capacity in our web pool. Just need to rename the host in the machine database, update DNS, update DHCP, etc. While this might not seem like a lot of effort it definitely adds up. When I worked on a fantasy sports product we were constantly renaming hosts as various seasons came around. Same thing with just keeping spare/provisioned hosts around. How do you know how to name the host so that someone can just grab it when they need it? You also eventually get the boxes that serve more roles than the box describes itself as. You'll end up with a box call misc or admin and no one remembers that one day someone set it up as your static origin.

Another fun problem is the inability to describe more in depth what a box does. mysql255 doesn't tell you if it's a master/slave, which data is on it, should it be backed up? I've actually seen places that encoded all of this in a hostname. This is the extreme but it does happen.

The interesting thing about both theme and function/role based names is that to use them effectively in a large environment you already need good tools for managing the roles because the hostname is not effective enough.

At Dropbox, they started with functional/role based names but we decided to move to positional hostnames. These encode the dc, rack, position, and chassis. One immediate benefit we saw with this was quickly identifying when a rack or quad goes down. It's very apparent in monitoring just at a glance. We also have a service database that maps hostnames to tags/roles and those tags appear along-side alerts so you can tell right away which service is affected. We get benefits in easy preprovisioning and reprovisioning. Our configuration has become more generic and easier to comprehend. We can run multiple roles easily on one machine and it's easily discoverable what machine serve what role. In puppet we use an External Node Classifier rather than regex. We only have to worry about base config when a rack is initially installed.

That's not to say this method is flawless. One of the biggest drawbacks to this approach is that machines become harder to talk about and typing them is more difficult. I'd argue that you shouldn't care about specific machines unless they're a problem and in that instance copy/paste should always be used to avoid typos. There's some cool things you can do with PowerDNS' Pipe Backend to get dynamic resolution to service names. Another problem with this approach is it just requires a lot more tooling to get started. Obviously not everyone has the time to build all of the infrastructure around this ideal.

Anyways, sorry for the rant, but everywhere I've worked we've started with role based names and regretted it in the long term. Now that I've finally been able to live what I've long dreamed of, I couldn't imagine choosing another solution.

Obviously hostname conventions are a contentious issue so I won't say anyone is wrong, but these are my experiences.

Re: Hostnames

#80
Imagine that some mystery virus has taken down or infected several boxes on your network and management want to know exactly what has gone on. In this scenario things are pretty sober and you really don't want to have anyone asking why the computers are named after some characters from a TV show or pretentious Greek myth characters. They won't see the funny side of it (if there is a funny side).

It is therefore much better to have important network machines and kit named in a logical manner, e.g. location-purpose-number.

As for what people have on their own desks, some people might detest whatever your cutesy name scheme is and be irked at having to use a machine called 'jigglypuff' just because they really never liked Teenage Mutant Ninja Turtles. They might also not really take to their workstation being impersonal, e.g. 'ldn-gfx-23'. Hence, on the desktop let people have a machine name of their choosing.

Post reply on HN