I've recently been thinking about the TTL of our DNS. We have A records for our servers and then CNAME records for the customer facing names. The www.example.com CNAME points to server-01.example.com for example. In the event of a failure we have the TTL set at 15mins on both the CNAME and A record.
However it dawns on me that this might not be optimal. Surely it should be that A record be 48 hours and the CNAME be 15mins. The CNAME just gets pointed to server-02.example.com in the event of a failure. The A record (in theory should be cached quite happily for a long time, because we use the CNAME as the switcher).
Looking around the Internet I found lots of people having their CNAME long and the A record short: CNAME and A record have different TTLs. Which one will be cached?
This seems contrary to what anybody would want. The question is, does DNS work in the way I hope it works, in that the CNAME request TTL is the important one for if I needed to switch servers in a hurry?