Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 4 down vote accepted

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).

share|improve this answer

(What Chris S said), plus that they're probably using GeoIP.

share|improve this answer

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".

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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