${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.)
If I know the hostname I or my team will be tempted to make one-off changes, breaking the whole "cattle" idea.
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.
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.