Hostnames should be:
- Unique
- This is required
- Inherently "meaningless"
- Meaningful names are rigid and brittle; meaningless names are flexible
- Names like mysql1 and lamp1 become inaccurate, but are not updated/changed
- The function of a server should be able to change over time; machines can be given a wholly new name when completely repurposed without causing confusion.
- With meaningful names, understandings of old names and new names can collide (ec-webapp2 holds the Oracle Application Server; ec-appserv1 was chosen as the name for a generic web application server)
- There are better ways to build documentation than embedding it in hostnames
- The information in meaningful hostnames is kept incomplete for the sake of brevity
- Easily distinguished from one another
- Having a conversation about the different functions of corp1, corp2, corp3, corp4, and corp5 very quickly becomes difficult for anyone but Michael and James to follow.
- Human readable
- Nouns only
Hostnames should not indicate:
- Location
- We currently only have one location.
- Associating a hostname with the physical location of a server means that it is difficult or inaccurate to move the server, or the hostname, to another location in the future.
- When a server is restored to an offsite location, the location information will be incorrect.
- Application name
- Associating a hostname with the function of a server means that either the server ought to only ever serve one function, or the name will be misleading.
- This does make sense in the case of clustered, single-purpose, disposable hosts (twea1, twea2, etc.).
- Sequence
- Numbering servers sequentially leads to gaps when servers are decommissioned or repurposed, or leads to confusion if the names are recycled to prevent gaps.
- This does, however, make sense in the case of clusters (twea1, twea2, etc.).
- Operating system
- Time (dates)
Hostname
- Alpha only
- Numerals allowed in the case of clusters of identical hosts
- Lowercase only
- Linux is case sensitive.
- This gives us better consistency for communication. No more guessing.
FQDN = hostname.wrdsb.ca
ARECORD = FQDN