Using Aliases for Services

Posted November 12, 2007

What are they?

An alias is simply a placeholder name for a specific service that points to the actual resource on the back-end. The end-user or client will see only the alias, never the back-end. The most common form of this is used heavily in DNS where a browser is requesting services from a web server using www.example.com but the actual server itself is rarely called www.

Why use aliases?

The purpose of using aliases for services is three-fold.

  1. Portability. If you tie your users or clients to a machine name, that machine name has to remain viable at all times and your services are tied to that inextricably. If the server goes down, there’s no easy way to recover without either getting the server back online or changing the name of another server to the original server name. Using aliases prevents being tied to a specific machine. If a server goes down, the appropriate alias is adjusted (either manually or preferably automatically) and the services are redirected to the live resource.
  2. High-Availability. The use of aliases allows multiple resources to server a single service – load balancing and clustering, for instance. In this scenario, if one resource goes offline, the service remains viable because one or more other machines are tied to the alias and are providing services.
  3. Security. The use of aliases provides a security shield by way of hiding the actual physical server(s) on the back-end.
How do you use them?

Every service that you want to use aliases on are a bit different, but the extra work getting them setup is worth the trouble.

For websites, web services, sql, mail, ftp and many others, the procedure is relatively painless. In it’s simplest form, assign a DNS A-record (e.g. www) to an IP pointing to the server providing the service. Setup the server to listen on that address for that alias. Load balancing and clustering is beyond the scope of this, but is easily doable.

For file servers, the easiest way to do this is using Distributed File System (DFS) over Active Directory (AD). Again, in its simplest form, a share is created in DFS that point to one or more back-end file servers.