I need this for load balancing. For example, I've two azure storage accounts (say a
and b
) and the blob addresses for those are a.blob.core.windows.net
and b.blob.core.windows.net
. Both of them store identical data. Now I need to provide a single external name (say example.com
) which points to both the storage accounts and should work in round robin. This can be achieved if I create two CNAME entries in DNS as following and it resolves to one of them in round robing.
example.com
CNAMEa.blob.core.windows.net
example.com
CNAMEb.blob.core.windows.net
But I can not create two CNAME records for a single name in Windows DNS server.
So is it ever possible?
Best Answer
Multiple CNAME records for the same fully-qualified domain name is a violation of the specs for DNS. Some versions of BIND would allow you to do this (some only if you specified the
multiple-cnames yes
option) and would round-robin load-balance between then but it's not technically legal.There are not supposed to be resource records (RRs) with the same name as a CNAME and, to pick nits, that would include multiple identical CNAMEs. Quoth RFC 1034, Section 3.6.2:
The letter-of-the RFC method to handle what you're doing would be with a single CNAME referring to a load-balanced "A" record.