Content Distribution Networks CPE 401 / 601 Computer Network Systems Modified from Ravi Sundaram, Janardhan R. Iyengar, and others.

Slides:



Advertisements
Similar presentations
Nick Feamster CS 3251: Computer Networking I Spring 2013
Advertisements

Amazon CloudFront An introductory discussion. What is Amazon CloudFront? 5/31/20122© e-Zest Solutions Ltd. Amazon CloudFront is a web service for content.
1 Server Selection & Content Distribution Networks (slides by Srini Seshan, CS CMU)
1 Content Delivery Networks iBAND2 May 24, 1999 Dave Farber CTO Sandpiper Networks, Inc.
A Taxonomy and Survey of Content Delivery Networks Meng-Huan Wu 2011/10/26 1.
HyperText Transfer Protocol (HTTP)
1 Caching in HTTP Representation and Management of Data on the Internet.
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao
Web Caching Schemes1 A Survey of Web Caching Schemes for the Internet Jia Wang.
Internet Networking Spring 2006 Tutorial 12 Web Caching Protocols ICP, CARP.
Cis e-commerce -- lecture #6: Content Distribution Networks and P2P (based on notes from Dr Peter McBurney © )
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
Chapter 2: Application Layer
EEC-484/584 Computer Networks Discussion Session for HTTP and DNS Wenbing Zhao
What’s a Web Cache? Why do people use them? Web cache location Web cache purpose There are two main reasons that Web cache are used:  to reduce latency.
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #13 Web Caching Protocols ICP, CARP.
CDNs & Replication Prof. Vern Paxson EE122 Fall 2007 TAs: Lisa Fowler, Daniel Killebrew, Jorge Ortiz.
HTTP and Web Content Delivery COS 461: Computer Networks Spring 2011 Mike Freedman
Anycast Jennifer Rexford Advanced Computer Networks Tuesdays/Thursdays 1:30pm-2:50pm.
1 Drafting Behind Akamai (Travelocity-Based Detouring) AoJan Su, David R. Choffnes, Aleksandar Kuzmanovic, and Fabian E. Bustamante Department of Electrical.
Internet Networking Spring 2002 Tutorial 13 Web Caching Protocols ICP, CARP.
Web Content Delivery Reading: Section and COS 461: Computer Networks Spring 2010 (MW 3:00-4:20 in CS105) Mike Freedman
Web, HTTP and Web Caching
15-744: Computer Networking L-21: Caching and CDNs.
1 Web Content Delivery Reading: Section and COS 461: Computer Networks Spring 2007 (MW 1:30-2:50 in Friend 004) Ioannis Avramopoulos Instructor:
Web Caching and CDNs March 3, Content Distribution Motivation –Network path from server to client is slow/congested –Web server is overloaded Web.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
Web Content Delivery Reading: Section and COS 461: Computer Networks Spring 2009 (MW 1:30-2:50 in CS105) Mike Freedman Teaching Assistants:
Technologies for Building Content Delivery Networks Pei Cao Cisco Systems, Inc.
Caching and Content Distribution Networks. Web Caching r As an example, we use the web to illustrate caching and other related issues browser Web Proxy.
Content Distribution Networks (CDNs) Mike Freedman COS 461: Computer Networks Lectures: MW 10-10:50am in Architecture N101
Content Delivery Networks - Principles & Practice Northeastern& Akamai Technologies Ravi Sundaram.
1 Content Distribution Networks. 2 Replication Issues Request distribution: how to transparently distribute requests for content among replication servers.
Caching and Content Distribution Networks. Some Interesting Observations r Top 1 % of all documents account for 20% - 35% of proxy requests r Top 10%
1 Caching  Temporary storage of frequently accessed data (duplicating original data stored somewhere else)  Reduces access time/latency for clients 
Content Distribution March 8, : Application Layer1.
Sipat Triukose, Zhihua Wen, Michael Rabinovich WWW 2011 Presented by Ye Tian for Course CS05112.
{ Content Distribution Networks ECE544 Dhananjay Makwana Principal Software Engineer, Semandex Networks 5/2/14ECE544.
CS640: Introduction to Computer Networks Aditya Akella Lecture 18 - The Web, Caching and CDNs.
Content Distribution March 6, : Application Layer1.
Week 11: Application Layer1 Web and HTTP First some jargon r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,…
Akamai vs. Flash Crowds and Distributed Denial of Service Akamai Technologies & Carnegie Mellon Bruce Maggs.
CDN Brokering* Presented By Nick Arnold Authors Alexandros Biliris, et. Al.
CPSC 441: Multimedia Networking1 Outline r Scalable Streaming Techniques r Content Distribution Networks.
2: Application Layer1 Chapter 2 outline r 2.1 Principles of app layer protocols r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail r 2.5 DNS r 2.6 Socket.
15-744: Computer Networking L-21: Caching and CDNs Amit Manjhi.
Making the Best of the Best-Effort Service (2) Advanced Multimedia University of Palestine University of Palestine Eng. Wisam Zaqoot Eng. Wisam Zaqoot.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 8 Omar Meqdadi Department of Computer Science and Software Engineering University of.
Content distribution networks (CDNs) r The content providers are the CDN customers. Content replication r CDN company installs hundreds of CDN servers.
HTTP evolution - TCP/IP issues Lecture 4 CM David De Roure
2: Application Layer 1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April.
Content Distribution Network, Proxy CDN: Distributed Environment
CS 6401 Overlay Networks Outline Overlay networks overview Routing overlays Resilient Overlay Networks Content Distribution Networks.
Content Delivery Networks: Status and Trends Speaker: Shao-Fen Chou Advisor: Dr. Ho-Ting Wu 5/8/
1 COMP 431 Internet Services & Protocols HTTP Persistence & Web Caching Jasleen Kaur February 11, 2016.
09/13/04 CDA 6506 Network Architecture and Client/Server Computing Peer-to-Peer Computing and Content Distribution Networks by Zornitza Genova Prodanoff.
Content Distribution Networks (CDNs)
Aditya Akella The Web Aditya Akella 18 Apr, 2002.
CSEN 404 Application Layer II Amr El Mougy Lamia Al Badrawy.
Introduction to Networks
Content Distribution Networks
Content Distribution Networks
Content Distribution Networks
HTTP request message: general format
Web Caching? Web Caching:.
Utilization of Azure CDN for the large file distribution
Internet Networking recitation #12
ECE 671 – Lecture 16 Content Distribution Networks
Content Distribution Networks
Content Distribution Networks
Presentation transcript:

Content Distribution Networks CPE 401 / 601 Computer Network Systems Modified from Ravi Sundaram, Janardhan R. Iyengar, and others

Content and Internet Traffic Internet traffic: 1. Shifts seismically (  FTP  Web  P2P  video) 2. Has many small/unpopular and few large/popular flows Zipf popularity distribution, 1/k Shows up as a line on log-log plot

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

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)

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: ”; “Pragma: no-cache”  HTTP/1.1 has “Cache-Control” “No-Cache”, “Private”, “Max-age: ” “E-tag: ”  If not expired, use cached copy  If expired, use condition GET request to origin  “If-Modified-Since: ”, “If-None-Match: ”  304 (“Not Modified”) or 200 (“OK”) response 5

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 6 client Proxy server client HTTP request HTTP response HTTP request HTTP response origin server origin server

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 7 origin servers public Internet institutional network 10 Mbps LAN 1.5 Mbps access link

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 8 origin servers public Internet institutional network 10 Mbps LAN 10 Mbps access link

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 =.6*2 s +.4*10 ms < 1.3 s 9 origin servers public Internet institutional network 10 Mbps LAN 1.5 Mbps access link institutional cache

When a single cache isn’t enough  What if the working set is > 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 10 public Internet Parent web cache

Problems with discussed approaches: Server farms and Caching proxies Server farms do nothing about problems due to network congestion, or to improve latency issues due to the network Caching proxies serve only their clients, not all users on the Internet Content providers (say, Web servers) cannot rely on existence and correct implementation of caching proxies Accounting issues with caching proxies. For instance, needs to know the number of hits to the webpage for advertisements displayed on the webpage

Problems  Significant fraction (>50% ) of HTTP objects un-cacheable  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  But…most dynamic content is small,  while static content is large (images, video,.js,.css, etc.) 12

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 13 origin server in North America CDN distribution node CDN server in S. America CDN server in Europe CDN server in Asia

Internet Content Providers End Users The Web: Simple on the Outside…

NAP UUNet Qwest AOL Network Providers Content Providers End Users Peering Points …But Problematic on the Inside

Why does my click not work  Latency - Browser takes a long time to load the page  Packet Loss - Browser hangs, user needs to hit refresh  Jitter - Streams are jerky  Server load - Browser connects but does not fully load the page  Broken/missing content

The Akamai Solution Servers at Network Edge Content Providers End Users NAP

Benefits of CDNs  Improved end-user experience  reduce latency  reduce loss  reduce jitter  Reduced network congestion  Increased scalability  Improved fault-tolerance  Reduced vulnerability  Reduced costs

Caches are used by ISPs to reduce bandwidth consumption, CDNs are used by content providers to improve quality of service to end users Caches are reactive, CDNs are proactive Caching proxies cater to their users (web clients) and not to content providers (web servers), CDNs cater to the content providers (web servers) and clients CDNs give control over the content to the content providers, caching proxies do not CDN vs. Caching Proxies

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

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

Content Delivery Networks (3) Origin server rewrites pages to serve content via CDN Page that distributes content via CDN Traditional Web page on server

Surrogate Request Routing Infrastructure Distribution and Accounting Infrastructure CDN CDN Architecture Origin Server Client

Content Delivery Infrastructure: Delivering content to clients from surrogates Request Routing Infrastructure: Steering or directing content request from a client to a suitable surrogate Distribution Infrastructure: Moving or replicating content from content source (origin server, content provider) to surrogates Accounting Infrastructure: Logging and reporting of distribution and delivery activities CDN Components

Server Interaction with CDN Distribution Infrastructure 1 1.Origin server pushes new content to CDN OR CDN pulls content from origin server Accounting Infrastructure 2 2. Origin server requests logs and other accounting info from CDN OR CDN provides logs and other accounting info to origin server CDN Origin Server

Request Routing Infrastructure Client Interaction with CDN 1 1. Hi! I need Go to surrogate delaware.cnn.akamai.com 3 3. Hi! I need content /sochi Q: How did the CDN choose the Delaware surrogate over the California surrogate ? Client Surrogate (DE) Surrogate (CA) CDN california.cnn.akamai.com delaware.cnn.akamai.com

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 known replicas  How to direct clients towards replicas 27

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 28

Trade-offs between approaches  Routing based (IP anycast)  Pros: Transparent to clients, circumvents many routing issues  Cons: Little control, complex, scalability  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 resolver’s population Much of this data can be estimated “over time” 29

DNS based Request-Routing Common due to the ubiquity of DNS as a directory service Specialized DNS server inserted in DNS resolution process DNS server is capable of returning a different set of A, NS or CNAME records based on policies/metrics

DNS based Request-Routing Akamai DNS DNS query: DNS response: A Session local DNS server (louie.udel.edu) DNS query: DNS response: A Surrogate Surrogate Akamai CDN merlot.cis.udel. edu delaware.cnn.akamai.com california.cnn.akamai.com Q: How does the Akamai DNS know which surrogate is closest ?

DNS based Request-Routing DNS query DNS response Session Akamai DNS Surrogate Akamai CDN merlot.cis.udel. edu local DNS server (louie.udel.edu) DNS query DNS response Measure to Client DNS Measure to Client DNS Measurement results Measurements

What is the Mapping Problem  Problem of directing requests to servers so as to optimize end-user experience  reduce latency  reduce loss  reduce jitter  Assumption - servers are fine  Applicable to 2 mirrors or 1000s of Akamai locations

Server Selection Metrics Network Proximity (Surrogate to Client): -Network hops (traceroute) -Internet mapping services (NetGeo, IDMaps) -…-… Surrogate Load: -Number of active TCP connections -HTTP request arrival rate -Other OS metrics -…-… Bandwidth Availability …

Attempt  Measure which is closer  Closeness changes over time  Measure frequently  Bothers people  Too many to do ~500,000 unique nameservers on any given day 10 sec per measurement cycle

Idea  Topology  relatively static  changes in BGP time  order of hours if not days  Congestion  dynamic  changes in round-trip time  order of milliseconds

Set cover  Let sets represent proxy points  Let elements represent nameservers  Find minimum collection of proxy points covering nameservers X covers 1, 2, 3 and 4 X 1 234

Topology Discovery  At each mirror maintain list of partial paths to nameservers  At each epoch extend paths by 1, in randomized fashion, and exchange with other mirror  If the two (partial) paths to a namerver have intersected then declare that nameserver done.  If path has reached forbidden IP then wait  Use pair of proxies in case of failure

Topology Discovery 500,000 nameservers reduced to 90,000 proxy points (clusters) Problem - Still too many measurements to do. 90,000 measurements every 10s with 32B packets requires a few Mbps per mirror. Solution Solution - Importance based sampling 7,000 account for 95% end-user load! Maps built every 10s

CDN Types (Skeletal) CDNs Hosting CDNRelaying CDN Partial Site Content Delivery Full Site Content Delivery URL Rewriting DNS based Request Routing Techniques

Value of a CDN Scale: Aggregate infrastructure size Reach: Diversity of content locations (diverse placement of surrogates) Request routing efficiency, delivery techniques

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. replaced with  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 Akamai’s clusters 42

How Akamai Works  Akamai only replicates static content  At least, simple version. Akamai also lets sites write code that run on their servers, but that’s a pretty different beast  Modified name contains original file name  Akamai server is asked for content 1. Checks local cache 2. Check other servers in local cluster 3. 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? 43

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 client’s 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 44

How Akamai Works – Already Cached End-user 45 cnn.com (content provider)DNS root serverAkamai server 12 Akamai high-level DNS server Akamai low-level DNS server Nearby hash-chosen Akamai server GET index. html GET /cnn.com/foo.jpg

How Akamai Works End-user 46 cnn.com (content provider)DNS root serverAkamai server Akamai high-level DNS server Akamai low-level DNS server Nearby hash-chosen Akamai server GET index. html GET /cnn.com/foo.jpg 12 GET foo.jpg 5