Indirection – the life saver
This is one of the very few technical principles that I absolutely insist upon and tend to have sense of humour failure when it is not adhered to. This has saved my life so many times that I have lost count.
The principle is simple:
All applications and end users should, wherever possible, only ever connect to a service by an aliased name, never the real name of the service.
By service I mean server, remote application, or anything with a name on the network.
In other words, always use the magic of indirection:
client -> alias -> service
So why is this so important? Well it is so much easier, orders of magnitude easier in fact, to change an alias to point at a different service than to change all the clients to point at a different name or to reinstall the service elsewhere with the same name. When things need moving, either for planned maintenance or because they break this gives us so much flexibility and control. Unfortunately too many techies only think about that when they are planning the move, by which time it is a nightmare.
The normal technical way to do this is using a CNAME in DNS. So we create a DNS record for the service like this
my-service IN A 10.0.0.1
and add the CNAME
my-alias IN CNAME my-service
But don’t forget, it is not just DNS where this can be done.
Recent Comments