[Dnsmasq-discuss] DNSMasq and CDN (akamai, etc)

Ed W lists at wildgooses.com
Fri Jul 8 10:39:08 BST 2011

I have a curious problem being served sub-optimal CDN servers when using
opendns or googledns

I am in London/UK and opendns appears not to have a local DNS cache, so
attempting to access bbc.co.uk and view the page images gives these results:

# dig news.bbcimg.co.uk

; <<>> DiG 9.7.3 <<>> news.bbcimg.co.uk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57231
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0

;news.bbcimg.co.uk.		IN	A

news.bbcimg.co.uk.	2413	IN	CNAME	newsimg.bbc.net.uk.
newsimg.bbc.net.uk.	202	IN	CNAME	news.bbc.co.uk.edgesuite.net.
news.bbc.co.uk.edgesuite.net. 3427 IN	CNAME	a1733.g.akamai.net.
a1733.g.akamai.net.	10	IN	A
a1733.g.akamai.net.	10	IN	A

;; Query time: 84 msec
;; WHEN: Fri Jul  8 10:22:02 2011
;; MSG SIZE  rcvd: 168

That ip range is in the USA and about 85ms away from me.

Instead using google dns I get:

# dig news.bbcimg.co.uk @
a1733.g.akamai.net.	19	IN	A
a1733.g.akamai.net.	19	IN	A

These are 41ms away

If I switch to my ISP DNS servers:

# dig news.bbcimg.co.uk @
a1733.g.akamai.net.	15	IN	A
a1733.g.akamai.net.	15	IN	A

These are 15ms away

So having discovered that using nominally faster DNS servers has amongst
other things the disadvantage that CDNs might pass you to suboptimal
choices, hurting you multiple times per web page...

So I tried this configuration:


But I notice that since the reply comes back in a single response that
the CNAMES are not resolved using the alternative server parts.

Disregarding all the privacy debates about using these super DNS
servers, does anyone have any thoughts on how to better handle getting
redirected to a local CDN, other than perhaps using only the ISP servers?


Ed W

More information about the Dnsmasq-discuss mailing list