Lecture 11 Content Distribution Networks (CDNs) - PowerPoint PPT Presentation

Loading...

PPT – Lecture 11 Content Distribution Networks (CDNs) PowerPoint presentation | free to download - id: 48169d-ZGZlM



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

Lecture 11 Content Distribution Networks (CDNs)

Description:

Content Distribution Networks (CDNs) CPE 401/601 Computer Network Systems s are modified from Mike Freedman and Tanenbaum - Wetherall CN5E by Tanenbaum ... – PowerPoint PPT presentation

Number of Views:74
Avg rating:3.0/5.0
Slides: 24
Provided by: cseUnrEd6
Learn more at: http://www.cse.unr.edu
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: Lecture 11 Content Distribution Networks (CDNs)


1
Lecture 11Content Distribution Networks (CDNs)
  • CPE 401/601 Computer Network Systems

slides are modified from Mike Freedman and
Tanenbaum - Wetherall
2
HTTP Caching
  • Clients often cache documents
  • When should origin be checked for changes?
  • Every time? Every session? Date?
  • HTTP includes caching information in headers
  • HTTP 0.9/1.0 used Expires ltdategt Pragma
    no-cache
  • HTTP/1.1 has Cache-Control
  • No-Cache, Private, Max-age ltsecondsgt
  • E-tag ltopaque valuegt
  • If not expired, use cached copy
  • If expired, use condition GET request to origin
  • If-Modified-Since ltdategt, If-None-Match
    ltetaggt
  • 304 (Not Modified) or 200 (OK) response

3
Web Proxy Caches
  • User configures browser Web accesses via cache
  • Browser sends all HTTP requests to cache
  • Object in cache cache returns object
  • Else cache requests object from origin, then
    returns to client

origin server
Proxy server
HTTP request
HTTP request
client
HTTP response
HTTP response
HTTP request
HTTP response
client
origin server
4
Caching Example (1)
  • Assumptions
  • Average object size 100K bits
  • Avg. request rate from browsers to origin servers
    20/sec
  • Delay from institutional router to any origin
    server and back to router 2 sec
  • Consequences
  • Utilization on LAN 20
  • Utilization on access link 100
  • Total delay Internet delay access delay
    LAN delay
  • 2 sec minutes milliseconds

origin servers
public Internet
1.5 Mbps access link
institutional network
10 Mbps LAN
5
Caching Example (2)
  • Possible Solution
  • Increase bandwidth of access link to, say, 10
    Mbps
  • Often a costly upgrade
  • Consequences
  • Utilization on LAN 20
  • Utilization on access link 20
  • Total delay Internet delay access delay
    LAN delay
  • 2 sec milliseconds

origin servers
public Internet
10 Mbps access link
institutional network
10 Mbps LAN
6
Caching Example (3)
  • Install Cache
  • Support hit rate is 60
  • Consequences
  • 60 requests satisfied almost immediately (say 10
    msec)
  • 40 requests satisfied by origin
  • Utilization of access link down to 53, yielding
    negligible delays
  • Weighted average of delays
  • .62 s .410 ms lt 1.3 s

origin servers
public Internet
1.5 Mbps access link
institutional network
10 Mbps LAN
institutional cache
7
When a single cache isnt enough
  • What if the working set is gt proxy disk?
  • Cooperation!
  • A static hierarchy
  • Check local
  • If miss, check siblings
  • If miss, fetch through parent
  • Internet Cache Protocol (ICP)
  • ICPv2 in RFC 2186 ( 2187)
  • UDP-based, short timeout

public Internet
Parent web cache
8
Problems
  • Significant fraction (gt50?) of HTTP objects
    uncachable
  • Sources of dynamism?
  • Dynamic data Stock prices, scores, web cams
  • CGI scripts results based on passed parameters
  • Cookies results may be based on passed data
  • SSL encrypted data is not cacheable
  • Advertising / analytics owner wants to measure
    hits
  • Random strings in content to ensure unique
    counting
  • Butmuch dynamic content small, while static
    content large (images, video, .js, .css, etc.)

9
Content Distribution Networks (CDNs)
  • Content providers are CDN customers
  • Content replication
  • CDN company installs thousands of servers
    throughout Internet
  • In large datacenters
  • Or, close to users
  • CDN replicates customers content
  • When provider updates content, CDN updates
    servers

origin server in North America
CDN distribution node
CDN server in S. America
CDN server in Asia
CDN server in Europe
10
Content Distribution Networks Server Selection
  • Replicate content on many servers
  • Challenges
  • How to replicate content
  • Where to replicate content
  • How to find replicated content
  • How to choose among know replicas
  • How to direct clients towards replica

11
Server Selection
  • Which server?
  • Lowest load to balance load on servers
  • Best performance to improve client performance
  • Based on Geography? RTT? Throughput? Load?
  • Any alive node to provide fault tolerance
  • How to direct clients to a particular server?
  • As part of routing anycast, cluster load
    balancing
  • As part of application HTTP redirect
  • As part of naming DNS

12
Trade-offs between approaches
  • Routing based (IP anycast)
  • Pros Transparent to clients, works when
    browsers cache failed addresses, circumvents
    many routing issues
  • Cons Little control, complex, scalability, TCP
    cant recover,
  • Application based (HTTP redirects)
  • Pros Application-level, fine-grained control
  • Cons Additional load and RTTs, hard to cache
  • Naming based (DNS selection)
  • Pros Well-suitable for caching, reduce RTTs
  • Cons Request by resolver not client, request for
    domain not URL, hidden load factor of
    resolvers population
  • Much of this data can be estimated over time

13
Content and Internet Traffic
  • Internet traffic
  • Shifts seismically (email?FTP?Web?P2P?video)
  • Has many small/unpopular and few large/popular
    flows mice and elephants

Zipf popularity distribution, 1/k
Shows up as a line on log-log plot
14
Server Farms and Web Proxies (1)
  • Server farms enable large-scale Web servers
  • Front-end load-balances requests over servers
  • Servers access the same backend database

15
Server Farms and Web Proxies (2)
  • Proxy caches help organizations to scale the Web
  • Caches server content over clients for
    performance
  • implements organization policies (e.g., access)

16
CDNs Content Delivery Networks (1)
  • CDNs scale Web servers by having clients get
    content from a nearby CDN node (cache)

17
Content Delivery Networks (2)
  • Directing clients to nearby CDN nodes with DNS
  • Client query returns local CDN node as response
  • Local CDN node caches content for nearby clients
    and reduces load on the origin server

18
Content Delivery Networks (3)
  • Origin server rewrites pages to serve content via
    CDN

Traditional Web page on server
Page that distributes content via CDN
19
How Akamai Works
  • Clients fetch html document from primary server
  • E.g. fetch index.html from cnn.com
  • URLs for replicated content are replaced in HTML
  • E.g. ltimg srchttp//cnn.com/af/x.gifgt replaced
    with
  • ltimg srchttp//a73.g.akamai.net/7/23/cnn.com/af/
    x.gifgt
  • Or, cache.cnn.com, and CNN adds CNAME (alias) for
  • cache.cnn.com ? a73.g.akamai.net
  • Client resolves aXYZ.g.akamaitech.net hostname
  • Maps to a server in one of Akamais clusters

20
How Akamai Works
  • Akamai only replicates static content
  • At least, simple version. Akamai also lets sites
    write code that run on their servers, but thats
    a pretty different beast
  • Modified name contains original file name
  • Akamai server is asked for content
  • Checks local cache
  • Check other servers in local cluster
  • Otherwise, requests from primary server and cache
    file
  • CDN is a large-scale, distributed network
  • Akamai has 25K servers spread over 1K clusters
    world-wide
  • Why do you want servers in many different
    locations?
  • Why might video distribution architectures be
    different?

21
How Akamai Works
  • Root server gives NS record for akamai.net
  • This nameserver returns NS record for
    g.akamai.net
  • Nameserver chosen to be in region of clients
    name server
  • TTL is large
  • g.akamai.net nameserver chooses server in region
  • Should try to chose server that has file in cache
  • Uses aXYZ name and hash
  • TTL is small
  • Small modification to before
  • CNAME cache.cnn.com ? cache.cnn.com.akamaidns.net
  • CNAME cache.cnn.com.akamaidns.net ?
    a73.g.akamai.net

22
How Akamai Works Already Cached
cnn.com (content provider)
DNS root server
Akamai server
GET index.html
Akamai high-level DNS server
1
2
Akamai low-level DNS server
7
8
Nearby hash-chosenAkamai server
9
10
  • End-user

GET /cnn.com/foo.jpg
23
How Akamai Works
cnn.com (content provider)
DNS root server
Akamai server
GET foo.jpg
12
11
GET index.html
Akamai high-level DNS server
5
1
2
3
6
4
Akamai low-level DNS server
7
8
Nearby hash-chosenAkamai server
9
10
  • End-user

GET /cnn.com/foo.jpg
About PowerShow.com