3 ms·
I work at a site with >1k hosts right now, and globally there's >>1k hosts. One thing that wasn't mentioned was the site code. For multi site installation it h
by caw 13y ago
I work at a site with >1k hosts right now, and globally there's >>1k hosts.
One thing that wasn't mentioned was the site code. For multi site installation it helps to know whether your host is in site 1 or site 2 without referring to the fully qualified domain name. At the last 2 jobs I worked for we also encoded VM status into it (generally add an extra V or VM into the name).
> I don't recommend zero padding numbers (01 vs 1), since it looks bad when you break the padding's length.
We totally zero pad, though our zero padding has a buffer. Otherwise, you break string sort, which is more important to us. So if you will never have more than 99 cron machines, use the 01. If you're going to have more than 100 but less than 999, use 001. So on and so forth.
We also reuse numbers after hosts end of life, though it's not immediate reuse (that would be confusing as heck). When you buy servers by the rack it doesn't matter what your numbering scheme is, you'll end up going through all the possible values.
So how do you track all these hosts when there's minimal information encoded? By database. Our host database tracks physical location, owners, after hour contacts, roles (e.g. the mysql vs postgres part), OS install images, etc.
- staunch 13y agoYou need some kind of server database no matter what your naming scheme. This is why I say hostnames really aren't as important as people pretend they are. Sorting hostnames as strings tends to not be as useful/common as it seems, in my experience. In your DB you can sort based on the parsed numeric version. I've just come to dislike varying padding (01 vs 001 on some servers) or breaking the padding (001 becoming 1234). But, as I said, it's all mostly personal preference.