4 ms·
Numbered hostnames are fine if you've got a cluster of identical machines such that there's not much value in differentiation. 'xyz241' is a test router 'xyz2
by Goladus 16y ago
Numbered hostnames are fine if you've got a cluster of identical machines such that there's not much value in differentiation.
'xyz241' is a test router
'xyz211' is a second test router
'xyz262' is a production webserver
'xyz546' is a production webserver
'xyz33' is a development database server
'xyz411' is a development database server for a temporary contract dev team.
'xyz101' is the corporate file server
If you have hundreds of devices to track, the weaknesses of using numbers should be apparent. The only advantage of that naming scheme is organization of the entire monolithic collection. It's easy to select new names and it is easy to enumerate the entire collection at once. Those are definitely advantages, but there are some obvious drawbacks, too. There's no obvious way to tell, short of committing it to memory, that "546" is a webserver.
To track of any other pattern, you'll have to encode some sort of information into the names. For example, you could organize the numbers, like most colleges do for classes. <subj> <level-number> * 100 + <course-number>. eg: MUSC 211.
- bobbyi 16y agoI would find it easier to remember that the 400's are webservers than that the pnictogens are webservers. You can also make the even/ oddness of the numbers significant like interstate highways. For practicality, you would combine meaningful names (for the groupings) with numbers (web3, dev5, router2) rather than bijecting the entirety of your company's assets onto a set of integers.
- sprout 16y agoMeaningful names are fine if you have enough servers that every single server can do one thing. But in smaller circumstances the 'web' server may need to do decidedly non-web tasks. And it's difficult to know this in advance, so trying to name things meaningfully will only cause confusion when someone discovers that the database server is running apache or the web server is hosting the local office nfs mounts. I like the use of something like elements because it lets you use the character of the element as a sort of metaphor for the function of the server - but since it's a metaphor and not a clear name it's understood that you can't rely on the name to know what the server does, and you should keep it documented.
- jeffbarr 16y agoI always figured that names are good if you treat your servers like pets -- unique, long-lived individuals with personalities and quirks. Otherwise, you use numbers, and you treat them like farm animals -- anonymous, members of a species, with shorter lives. You can get attached to pets, but you shouldn't bond to livestock.
- Goladus 16y agoI wouldn't say it's good or bad, it just is. Sometimes being attached to a server can be helpful, but it can also be a hindrance. There's no right or wrong answer.
- eli 16y agoYou also should never have hundreds of pets at once.
- gxti 16y agoLest you become a crazy cat lady. I like this metaphor.