News for hackers. Stuff that matters.
Re:RFC 1178 – Choosing a name for your computer (1990) by RcouF1uZ4gsC on Monday April 02, 2018 @09:35PM (#16741181)
This reminds me of the Pets vs Cattle analogy https://www.engineyard.com/blog/pets-vs-cattle

With a pet, you obsess over the name and meaning of the name. With cattle, as long as names don't collide or cause problems, you couldn't care less about the name.

Re:RFC 1178 – Choosing a name for your computer (1990) by tscs37 on Tuesday April 03, 2018 @08:49AM (#16744114)
My personal machines are all pets ("thematrix", "heartofgold", "laputa" and "isengard") and my production systems are cattle ("sqldb01", "sqldb02", "gitea", "redis0", "redis1", "rabbitmq", "mastodon", etc.)

Mostly because for automation it's easier to know what a system does by looking at the hostname. When you manage about 30 systems all over the place, that's the only reasonable solution (I do see people trying to give pet names to their production systems but it gets out of hand and they usually just maintain a directory of what system does what somewhere)

Re:RFC 1178 – Choosing a name for your computer (1990) by kkirsche on Tuesday April 03, 2018 @08:54AM (#16744150)
Is that really cattle though? Instead of sql01 I’d think a more cattle based name would be db01, db02 etc so it’s database agnostic. For the redis and rabbitmq, I’d think that’s more mq01, mq02, etc for generic message queue servers. Potentially I’m taking the analogy too far though
Re:RFC 1178 – Choosing a name for your computer (1990) by tscs37 on Tuesday April 03, 2018 @09:01AM (#16744211)
That's also valid but I like to know exactly what type of DB is running (SQLDB runs Mysql and Postgres Nodes for example) so I can quickly jump and find servers without much thinking.
Re:RFC 1178 – Choosing a name for your computer (1990) by JasonFruit on Tuesday April 03, 2018 @10:38AM (#16745015)
So more like dairy1, dairy2... beef1, beef2 ...
Re:RFC 1178 – Choosing a name for your computer (1990) by hanbura on Tuesday April 03, 2018 @09:53AM (#16744573)
db01 is taking it into meaninglessness. Is that running PostgreSQL, Redis or MongoDB? Was Redis on db05 or cache01? That's not far from naming them server01, server02, etc.

sql01 is good if you only use sql abstraction layers, otherwise you probably even want postgres01 and mysql01. Or even postgres-olap01 and postgres-oltp01, if that's what you do.

Re:RFC 1178 – Choosing a name for your computer (1990) by tscs37 on Wednesday April 04, 2018 @12:14AM (#16751841)
sqldb01 and sqldb02 is fair since both run Mysql, Postgresql and Redis. There is no difference between nodes.

If had a pure mysql server I'd call it mysql01

Re:RFC 1178 – Choosing a name for your computer (1990) by txutxu on Tuesday April 03, 2018 @04:39AM (#16742859)
This did sound cool to me, at the beginning of the auto-scaling, image-based, cloud times...

But then I did realize a couple of things, that improve with meaningful names:

1) Alerts impact and scope. It's easy to know what are you seeing in your phone, if balancers, rds clusters, and instances have meaningful names.

2) Metrics visualization. Maybe the graph is the same, but a meaningful legend sometimes helps.

3) SSH connection. I like to auto-complete SSH, not to copy/paste ssh and write down extra parameters like different .pem files.

4) (Inter) team communication. The same that with graph legends, for humans, it's easier with names than with ids.

5) Custom commands parametrization. The same than ssh, I prefer to be able to write down the parameter (host name, service name) of my command, without getting out of the terminal, copy the ID or IP, get back, paste, verify...

6) Costs/Reports visualization.

7) Backup management. Let's say S3 parent for the backups of a instance/service. Backup reports too.

At the end, I think that I can have cattle mentality regarding Configuration Management, System patching, Version change, etc... BUT I still can get benefits from thinking a little bit element and service names.

At the beginning (of the cloud concept), I did read pet Vs cattle, and I did think IDs were the thing. Now I think that to scale to many customers or many environments, it's better with previous thinking. Being the little string of the alert in the phone, the biggest winer.

Re:RFC 1178 – Choosing a name for your computer (1990) by semanticist on Tuesday April 03, 2018 @07:43AM (#16743711)
I think the compromise is autogenerated-but-meaningful names. I wrote a Ruby script to generate memorable/meaningful names which is included as part of the automated server launch process. (https://github.com/johnd/server-name)

You never want to have to manually pick a name, or even stop to think about it, but using pure IDs for anything with a life longer than a day can get annoying.

Re:RFC 1178 – Choosing a name for your computer (1990) by yjftsjthsd-h on Monday April 02, 2018 @10:30PM (#16741433)
Depends how you mean that; I would rather a machine be named prod-app-web-7 than af74b9c. At least mark the cattle by breed!
Re:RFC 1178 – Choosing a name for your computer (1990) by paulmd on Tuesday April 03, 2018 @12:01AM (#16741821)
Winner winner, chicken dinner. As someone who is still managing pets, I even still prefer a standardized naming scheme. I use:

${project}-${dev/staging/web}-${web/db}

(which so far has covered my bases, I'm sure you can come up with any logical extensions if you are running load-balancers or other types of servers, add a number if you are running multiple frontends or clustered DBs, etc)

Even as someone who manages pets, I can't tell you how much time this has saved me from having to look up server names. I have done the generic "assign everything to a single machine## sequence" and it sucks ass. Was your production web server for this app machine32 or machine 54? What about the staging server? Can't even imagine the hassle of uuids as server names.

(of course so far I have done the pets thing in my internal network... but I can tell you that my father with a 40y career in managing servers for major corporations uses names like vmhost01/fsrv01/tvpc at home... which tells you what he thinks of that.)

Re:RFC 1178 – Choosing a name for your computer (1990) by SteveNuts on Monday April 02, 2018 @10:44PM (#16741486)
That goes against the paradigm. I prefer that my hostnames are ambiguous, that way I'm forced to write tools to automate administrative tasks.

If I know the hostname I or my team will be tempted to make one-off changes, breaking the whole "cattle" idea.

Re:RFC 1178 – Choosing a name for your computer (1990) by deathanatos on Monday April 02, 2018 @11:34PM (#16741698)
It is still helpful to have decent names even if you're treating your machines like "cattle" instead of like "pets".

Inevitably, some bug will occur, and in my experience, it usually happens to occur on a machine (rather than all of them at once; I'm not saying this machine is special — the bug could have happened on any of them, and likely exists on all of them because they're all running the same code, but this particular machine ended up being the lucky one to serve that slightly unusual request).

Getting in and debugging the state of that machine, pulling logs, directing a coworker to look at CPU detail "frobnozz", etc. is all easier if I can easily speak or type out the machine's name. "3.dev.microservice" is much easier to type/speak than say, an IP address, an EC2 instance ID, etc.

(I fully agree on not making one-off changes, and not treating machines as pets. But I think that even after that, decent naming has a place.)

And even with cattle, the other way, I still think it's useful for the name to provide some information. I.e., 3.prod.microservice being the third or fourth instance of the production setup of "microservice" is better than say, some random entry from the periodic table of elements.

Re:RFC 1178 – Choosing a name for your computer (1990) by mulmen on Tuesday April 03, 2018 @01:58AM (#16742244)
If you have to say the name of an instance you already lose.
Re:RFC 1178 – Choosing a name for your computer (1990) by semanticist on Tuesday April 03, 2018 @07:34AM (#16743647)
If you do anything to the point of dogma, you've lost. Being a good sysadmin is all about being pragmatic.
Re:RFC 1178 – Choosing a name for your computer (1990) by Pxtl on Monday April 02, 2018 @11:53PM (#16741777)
Then the paradigm is wrong. Serving websites is the most important thing a webserver does, call it that. If that changes, rename it. If renaming it is impossible, you failed.
Re:RFC 1178 – Choosing a name for your computer (1990) by mulmen on Tuesday April 03, 2018 @02:00AM (#16742246)
What about all the application servers behind the load balancers?
Re:RFC 1178 – Choosing a name for your computer (1990) by djur on Tuesday April 03, 2018 @01:17AM (#16742101)
I think it's useful to give long-lived entities memorable names (literally in the sense of 'possible to remember') to allow people to draw fortuitous connections and keep similar entities distinct from each other during discussions. Even if you're just trying to keep track of which server it is that seems to be faulting.
Re:RFC 1178 – Choosing a name for your computer (1990) by mulmen on Tuesday April 03, 2018 @02:01AM (#16742252)
I think its more important that names refer to long-lived resources. If I put a DB name in a connection string I want to see the same data every time. I don't care what hardware it is on.
Re:RFC 1178 – Choosing a name for your computer (1990) by matt_wulfeck on Tuesday April 03, 2018 @12:47AM (#16741988)
There's no reason you can't have both.
Re:RFC 1178 – Choosing a name for your computer (1990) by da_chicken on Tuesday April 03, 2018 @10:28AM (#16744926)
Well, it helps to remember that RFC 1178 is from the days of single monolithic mainframes. Today we've got virtual machines that do everything, so each server can legitimately carry one name. However, if you do call it "prod-app-web-7," then you need to make sure that it's a web server for the app application in production and if that changes, you need to spin up a new server instead of reusing the VM.

But, hey we don't name infrastructure sites "Site 1" and "Site 2". They're "Milwaukee" and "Austin" and "DR". So if we do that, why name them "EMC-SAN-1" and "EMC-SAN-2"? We're going to retire that name eventually and there won't be a SAN 1 anymore. And what happens after "EMC-SAN-9"? So, instead why not "EMC-SAN-ARTEMIS" and "EMC-SAN-APOLLO" and "EMC-SAN-HADES"?

There's a distinction between physical names and logical names, too. What kind of long term nomenclature planning should we have? Look at hurricane names. The NWS does that so people remember which is which.

Re:RFC 1178 – Choosing a name for your computer (1990) by rspeer on Monday April 02, 2018 @10:38PM (#16741461)
Okay, but a lot more people own pets than own cattle. In the computer sense as well.
Re:RFC 1178 – Choosing a name for your computer (1990) by khedoros1 on Tuesday April 03, 2018 @12:01AM (#16741823)
I've got about 5 computers at home. Most of them have "pet" names. I've got about 500 computers at work. Have fun treating them as anything but cattle.
Re:RFC 1178 – Choosing a name for your computer (1990) by glenneroo on Tuesday April 03, 2018 @06:06AM (#16743263)
Reread his comment. You are the exception. I would even venture to say that a lot of HN users are also exceptions, but neither HN nor IT administrators are most people.
Re:RFC 1178 – Choosing a name for your computer (1990) by isostatic on Tuesday April 03, 2018 @10:50AM (#16745133)
HN is based around web based work, databases, webservers, load balancing, stuff that can (or does) run in VMs in clouds. If that's stuff that can be automated, then great, you don't need to know the IP, let alone have a hostname.

Most of the general purpose computers (and certainly the vast majority of devices with an IP) I deal with have real world interfaces, SDI ports and/or analog/digital audio connections. I'm not going to give my encoder in Nairobi a name that doesn't say "Nairobi Encoder" (PTR returns NRB-ENC001-obe, forward lookup for NRB-ENC001), same with encoder 2 at New Scotland Yard, and the same with the ntop/monitoring box I have in the New York office. I can't self heal equipment when a lorry drives into it, but I need to know that it's the Old Bailey monitoring box that's broken.

Re:RFC 1178 – Choosing a name for your computer (1990) by khedoros1 on Tuesday April 03, 2018 @01:14PM (#16746847)
> Reread his comment.

Thank you for implying that I didn't know exactly what I was responding to, and that I didn't read it carefully. The grandparent to my comment mentioned the cattle-pet distinction. The parent comment took that as some kind of statement of how common each situation is. I replied in a similarly loosely-connected manner, trying to reinforce the grandparent comment's point.

I fully understand that "cattle-owners" are less common, and that that's part of what the parent comment was saying. Reread the comment that they replied to, and reinterpret my comment as a reiteration of the grandparent comment, phrased in a different way.

Re:RFC 1178 – Choosing a name for your computer (1990) by cam_l on Tuesday April 03, 2018 @01:46AM (#16742206)
I have known dairy farmers to name each one of their 4-500 head personally. Never seen that with beef cattle farmers though..
Re:RFC 1178 – Choosing a name for your computer (1990) by mulmen on Tuesday April 03, 2018 @02:04AM (#16742259)
What kind of cattle do you think servers most resemble?
Re:RFC 1178 – Choosing a name for your computer (1990) by laumars on Tuesday April 03, 2018 @03:56AM (#16742673)
If the servers are immutable (eg in auto-scale groups) then it's more like beef cattle because you don't expect your servers / cattle to survive to old age.

If they are any servers that cannot be auto created / destroyed without human oversight - or if their downtime breaks other resources along the chain (eg non-clustered DB server) then I'd argue those servers are a little more like dairy cattle.

Re:RFC 1178 – Choosing a name for your computer (1990) by cam_l on Tuesday April 03, 2018 @02:40AM (#16742384)
Ha! Excellent point.

Though with all the milking machines hooked up the dairy cows probably look more like them visually speaking..

And these days servers might be more metaphorically close, increasingly, to just the beef itself. Decentralised, to somewhat stretch the analogy.

Re:RFC 1178 – Choosing a name for your computer (1990) by twic on Tuesday April 03, 2018 @04:50AM (#16742909)
Goats.
Re:RFC 1178 – Choosing a name for your computer (1990) by jasonkester on Tuesday April 03, 2018 @07:28AM (#16743613)
I've personally eaten a roast from a cow named Luke, at a beef farmer's house. It certainly happens.

He was tasty.

Re:RFC 1178 – Choosing a name for your computer (1990) by flurdy on Tuesday April 03, 2018 @05:34AM (#16743112)
Migrating from Pets to Cattle for server names also means you no longer are attached to the server, so it can be replaced or shut down without any personal attachment.

That is also how I feel about Microservices these days. I may still name the service with a "pet" like symbolic name, but I treat them as cattle.

They can be split, repurposed, deleted, rewritten any day without much remorse or delay. No personal attachment.

Re:RFC 1178 – Choosing a name for your computer (1990) by flurdy on Tuesday April 03, 2018 @05:28AM (#16743087)
I still name all personal and corporate laptops and pcs as pets.

But all servers are named as cattle.

But these days they may not even be cattle named as they are spun up and down so frequently in cloud environments that names makes no sense.

Pets -> Cattle -> Population?

Re:RFC 1178 – Choosing a name for your computer (1990) by dghughes on Monday April 02, 2018 @10:23PM (#16741402)
Well, maybe, as long as you make sure you the bulls and cows are separated.