Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is A significantly faster than CNAME in this case?

$ dig

; <<>> DiG 9.8.1-P1 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28336
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0

;                        IN      A

;; ANSWER SECTION:         13      IN      A         13      IN      A         13      IN      A         13      IN      A         13      IN      A         13      IN      A

;; Query time: 11 msec
;; WHEN: Thu Jan 24 10:22:28 2013
;; MSG SIZE  rcvd: 128
share|improve this question

closed as not constructive by Sven, Dave M, Alex, Lucas Kauffman, EEAA Jan 24 '13 at 13:50

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

Why should they ever use a CNAME? A CNAME would require two lookups at the client side and there seems absolutely no necessity to use it. – the-wabbit Jan 24 '13 at 10:26
How would we know and why would we care? – joeqwerty Jan 24 '13 at 13:32

Well, if you are Google, with many millions of DNS queries a day, I would say reducing the queries by 50% is significant.

share|improve this answer

The primary goal to use CNAME RRs is to ease DNS zone administration. As it is just a pointer to another label with all its RRs (not just A RRs by the way, all RRs), in the olden days, where changing RRs would involve firing up vi to edit the BIND-style zone file you would have less work to do if you ever needed to change RRs.

Google zones are certainly not edited by hand in BIND-style files, so the utility of CNAME records would be questionable. Additionally, google uses geo-DNS, where the RR reply would depend on from where you are querying - static CNAMEs would not help there at all.

Also, whenever a DNS query for a label results in a CNAME response, another query has to be performed to get the RR of the CNAME destination label. The adverse latency and resource consumption effects are mostly neutralized by caching resolvers at the ISP's side, but if there is no specific need for CNAMEs, they simply should not be used.

share|improve this answer
Do you think A records could be multiple but CNAME cannot, which using multiple A records would helps in load balancing? – neo Jan 24 '13 at 11:04
@neo Using Geo-DNS is about exercising control over what data is returned for which query from which location. Using CNAME records is doing pretty much the opposite - delegating control to the destination zone. So while having a setup where you control both zones still might work out for a specific application, it does not make much sense conceptually to use CNAMEs in such a setup. – the-wabbit Jan 24 '13 at 11:37

I would say that A is faster than CNAME in any case! Because when you look for ip address for domain with cname record dns always do twice much work then looking only for A record.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.