Host and Server Naming Conventions
There was some discussion recently about how to name a server. Some common practices in the past for naming servers were to use a theme. So you might use the names of planets or cities or some other witty theme.
The problem with themes is that once you have hundreds or thousands of machines to name you begin to run into challenges with remembering which names you have already used or you just run out of planets to use.
So how can you avoid the problems of using a theme for a naming convention and still get a useful name. The bad news is that there is no perfect solution to this problem. You could use some random name generator, but that is that helpful. It avoids the problem of having to come up with a name yourself and it also avoids the problem of running out of ideas. Perhaps naming a server
mlcrkkyz by creating a random string works for you. For most admins this would be a nightmare. What is that server even use for?
With the ever increasing popularity of cloud based servers a convention of including location information in the host name has been sued in the host name. Including a role for the server and a service level is also helpful. Adding an indexer or sequential ID is helpful to distinguish servers that may otherwise generate the same name.
If we use this as our naming convention we might get hostnames that look like the following.
So the first server name would indicate that it is located in the United States and in California. The 153 building number other local identifer. DB indicates that the role of the server is a database and the P indicates that it is a production server. The 001 is just an indexer to avoid name conflicts with similar hostnames.
In the second example we can see that the server is located in the European Union and in Italy. The R is a local identifer. WS indicates that this is a web server and the T indicates that it is in a test environment. Finally the 002 is just a sequential identifier.
Using a naming convention like this is great because it is scalable, easy to identify the location of the server, the role of the server and the type of environment the server is use for. Some downsides to using this is that if you only have a single location for servers then there is a lot of redundancy in the names and using location information in the name doesn't really add much useful information. If you do change the location of a server then the name will have to change. This can provide quite a few challenges and is generally frowned upon. The length of names for such hostnames can also be an issue for some tools.
If that naming convention works for your situation then great. Here are some variations on that concept. In the not to distant pass servers were located on premise and you had full control over them. These days it is not uncommon to have servers that are in the cloud. Often you have a hybrid environment were some servers are in the cloud and some are located on premise. Perhaps a location identifier that identifies the provider as cloud or on premise would be useful. If you use multiple cloud providers then you can indicate which provider it is with.
If you do not have multiple locations then perhaps a department or customer identifier would be more appropriate. If you have a mix of platforms then you may want to use software or service identifier.
Here is a alternative suggested format for names.
Location of server
- (L)OP - Local On Premise
- GC(P) - Google Cloud Platform
- (M)AZ - Microsoft Azure
- AW(S) - Amazon Web Services
- WIN - Windows
- NIX - Unix variant
- CentOs - Centos
- Ubuntu - Ubuntu
- RD - Research and Development
- AM - Advertising and Marketing
- CM - Communications
- IT - Information Technology
- DB - Database
- DC - Domain Controller
- AS - App Server
- SW - Switch
- WS - Web server
- P - Production
- T - Test
- D - Development
- S - Staging
Using all or a subset of the above might result in hostnames similar the the following.
You can add dashes to help with the human readability of the server and put the identifiers in whatever order makes since for your organization.
I hope this gives you a place to start when thinking about how you can name your devices.
You must be logged in to see the comments. Log in now!