I am looking at setting up a hostname convention for our servers based on the service they provide, such as http, https, smtp, pop, dns, sql, etc. Each service is on its own virtual machines on a Xen host server (dom0), for which there are multiple Xen host servers (10+). I have read both the Datacenter Naming Scheme by Mark Garner of Sun and RFC 1178 as well as a few Google searchs but those seem to focus on having many servers that perform only a few services, such as a larger cluster (10+) of database servers, a large cluster of web servers, a large cluster of mail servers, etc. In my situation we are working with a small cluster (2-4) of virtual servers for a large number of services (12+). In this regard I do not like the idea of having a different hostname theme for each service, such as all mail servers being named after birds, all database servers after trees, and so on, because I think it will become confusing with very few hosts and very many different services. I am wondering if anyone has a good idea for defining hostnames in such an environment. Thank you.
Since you have more than one service per server, I would suggest giving your machines some hostname based off whatever theme you like, then using 'service names'.
For example, host bart might have service names www1, imap1 and ftp1.
Add those service names to DNS and then (depending on your preferences and desire for complexity) either:
Now, make sure you reference services on that machine using the service name (www1), not the hostname.
here I found a good naming convention:
http://virtualizationreview.com/blogs/virtual-insider/2011/10/how-to-design-an-effective-naming-convention.aspx
What's wrong with http###, sql###, dns###, etc.?
Naming conventions are great when there's no easily described distinction between what the various virtual machines do, but if each one is running an individual service, it's going to be clearest to name them by that service.
The naming scheme where I work today works like this:
|server Role||Domain or Owner||site Code||Serial||Extra Modifier|
This translates to names like this: dnsenet0b1ab
The key to naming is consistency. Whatever naming scheme you use, as long is it gets the information that you need across and is ruthlessly enforced, you'll find that consistent, informative naming will speed up projects and make management easier for large install bases.
This system may look intimidating, but it is really great once you get used to it AND is reasonably easy to type and talk about. It's easy to determine the type of server, where it is, etc at a glance. You could easily expand it to include other information that means more to you.
For things that have client exposure, I think that it's a great idea to supplement this with service descriptive CNAME records that aren't tied to a server. Make your mail server mail.example.com, http server intranet.example.com, etc.
You mentioned that servers share roles. If you see an affinity among services, create a "server class". Many places put SMS/SCCM, print queues and AV on file servers... call it a "host management server (hms)" or whatever.