I'm trying to understand precisely how Akamai uses DNS lookups to redirect users to proximate servers. As I understand it, the client's browser tries to resolve a DNS name, such as a388.g.akamaitech.net
to an IP address, and this is what allows an IP address to be returned by Akamai that represents a close by server. What I'm having trouble with is that I've searched through the HTML source (simply Ctrl + F) of a number of web pages of sites claiming to be using Akamai, and yet cannot find any references in the source to urls with "akamai" in the domain name (e.g. ...akamaitech.net/some/path/someimage.gif
. What is it that I'm missing here?

- 53,795
- 33
- 135
- 209

- 407
- 1
- 5
- 8
2 Answers
They use their own DNS names, say www.example.com; but it's actually a CNAME record that points to www.example.com.akamaitech.net (or whatever).

- 77,945
- 11
- 124
- 216
-
(What Chris S said), plus that they're probably using GeoIP. – pauska Sep 03 '10 at 17:36
As Chris explained, this is done through DNS, rather than HTML, so in the source it looks like the URL is example.com/someimage.gif; but the example.com bit is resolving to an Akamai server through DNS.
By using their clever techniques, Akamai can make sure your lookup resolves to an IP address close to you (e.g. using Geo-location as Erik suggested, although sometimes the geographically closest server may not be the fastest-connected one) - if the content is already cached at that server, then you'll be getting a faster browsing experience immediately; and if not, they'll probably start caching for you, and doing other things behind the scenes (e.g. pre-fetching) to speed up your experience, too.
To see the IP you have resolved to in Windows, you can type "ipconfig /displaydns". On my system, I can see the following for serverfault.com, showing the actual IP addresses used behind the scenes:
serverfault.com
----------------------------------------
Record Name . . . . . : serverfault.com
Record Type . . . . . : 1
Time To Live . . . . : 65594
Data Length . . . . . : 4
Section . . . . . . . : Answer
A (Host) Record . . . : 69.59.196.211
<snip>
I looked into this subject several years ago, and it is a fascinating subject, but to fully understand it involves learning details of DNS and IP that most web users never have to think about. The best search term if you want to read more about the subject is "Content Delivery Networks".

- 575
- 3
- 13