JMU
Caching
An Introduction


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu


Motivation
Client-Side Caching
Server-Side Caching
Caching at Intermediaries
Caching at Intermediaries - Examples
Content Distribution Networks
CDNs - Which Server?
CNDs - What Layer/Protocol?
Working with HTTP/HTML
  1. Client fetches HTML document from source
    • GET index.html from jmu.edu
  2. Appropriate replicating server is identified
    • va.mycdn.com
  3. URLs of replicated content are replaced in response
    • jmu.edu/images/quad.gif is replaced with va.mycdn.com/jmu.edu/images/quad.gif
  4. Client fetches va.mycdn.com/jmu.edu/images/quad.gif
    • The image may or may not have been cached on va.mycdn.com
    • If the image is not on va.mycdn.com, it acts as a proxy and requests it from jmu.edu
Using the Domain Name System
Using the Domain Name System - An Example - Akamai
  1. Root server gives a nameserver (NS) record for Akamai
    • akamai.net
  2. The akamai.net nameserver returns an NS record for a nearby client
    • b.akamai.net
  3. The b.akamai.net nameserver returns an appropriate nearby server
    • a1105.b.akamai.net
Using the Domain Name System - An Example (cont.)

dig www.bestbuy.com
;; ANSWER SECTION:
www.bestbuy.com.  3600     IN  CNAME   www.bestbuy.com.edgesuite.net.
www.bestbuy.com.edgesuite.net. 21600 IN   CNAME   a1105.b.akamai.net.  
a1105.b.akamai.net.   20   IN   A   198.7.236.235  
a1105.b.akamai.net.   20   IN   A   198.7.236.240  
;; AUTHORITY SECTION:  
b.akamai.net.   1101  IN   NS   n1b.akamai.net.  
b.akamai.net.   1101  IN   NS   n0b.akamai.net.  
;; ADDITIONAL SECTION:  
n0b.akamai.net.   1267 IN  A    24.143.194.45  
n1b.akamai.net.   2196 IN  A    198.7.236.236