What does the TTL on a CNAME record mean?

Solution 1:

According to this message on ISC mailing list, CNAME and the record that it points to are cached by resolving name servers (sane resolving name servers) this is done to allow resolvers to be able to optimize the resolving/caching process on the client side.

So, if the CNAME TTL is valid but the A that it points to is invalid, it will only repeat the look up to the pointed record, not the original CNAME (until the CNAME TTL is up too).

Solution 2:

All you CNAME records will be cached for a maximum of 3600, 10800 and 21600 seconds.

The A records are handled independently and will be queried again every 60 seconds.

However, in case the CNAME expires, the A record should be updated at the same time.

CNAME records have various gotchas explained in RFC 1912. mydomain.com. can't be a CNAME, because you have SOA and NS records used: it's a delegation of com. domain.

Your question is old. Nowdays some DNS providers are not following RFCs by letting users put CNAMEs in the SOA (they call it APEX domains). Again, use at your own risks.

Last but not least, putting higher TTL values on you CNAMEs could help when your clients are asking for an IPv6 record: AAAA. At least the CNAME mapping will stay in cache, and only the IP address will be asked twice.

In short: putting higher TTL on the CNAME will reduce the size of the responses seen by your clients. It should also help the resolver server. However the number of requests per second should roughly be the same.