Mul$media Networking #9 CDN Solu$ons Semester Ganjil 2012 PTIIK Universitas Brawijaya
Schedule of Class Mee$ng 1. Introduc$on 2. Applica$ons of MN 3. Requirements of MN 4. Coding and Compression 5. RTP 6. IP Mul$cast 7. IP Mul$cast (cont d) 8. Overlay Mul$cast 9. CDN: Solu,ons 10. CDN: Case Studies 11. QoS on the Internet: Constraints 12. QoS on the Internet: Solu$ons 13. Discussion 14. Summary #9 Mul$media Networking 2
Today s Outline Ways to distribute video online Client- server IP Mul$cast P2P Media Streaming CDN (Content Delivery Networks) #9 Mul$media Networking 3
Content Delivery/Distribu$on Networks (CDN)
Content Distribu$on Network challenge: how to stream content (selected from millions of videos) to hundreds of thousands of simultaneous users? op,on 1: single, large mega- server single point of failure point of network conges$on long path to distant clients mul$ple copies of video sent over outgoing link.quite simply: this solu$on doesn t scale #9 Mul$media Networking 5
Content Distribu$on Network challenge: how to stream content (selected from millions of videos) to hundreds of thousands of simultaneous users? op,on 2: store/serve mul$ple copies of videos at mul$ple geographically distributed sites (CDN) enter deep: push CDN servers deep into many access networks close to users used by Akamai, 1700 loca$ons bring home: smaller number (10 s) of larger clusters in POPs near (but not within) access networks used by Limelight #9 Mul$media Networking 6
Content Distribu$on Network Proac$ve content replica$on Content provider (e.g., CNN) contracts with a CDN CDN replicates the content On many servers spread throughout the Internet Upda$ng the replicas Updates pushed to replicas when the content changes origin server in North America CDN distribution node CDN server in S. America CDN server in Europe CDN server in Asia #9 Mul$media Networking 7
Server Selec$on Policy challenge: how does CDN DNS select good CDN node to stream to client pick CDN node geographically closest to client pick CDN node with shortest delay (or min # hops) to client (CDN nodes periodically ping access ISPs, repor$ng results to CDN DNS) IP anycast alterna,ve: let client decide - give client a list of several CDN servers client pings servers, picks best Nedlix approach #9 Mul$media Networking 8
Server Selec$on Policy Live server Requires continuous monitoring of liveness, load, and performance For availability Lowest load To balance load across the servers Closest Nearest geographically, or in round- trip $me Best performance Throughput, latency, Cheapest bandwidth, electricity, #9 Mul$media Networking 9
10 Server Selec$on Mechanism Applica$on HTTP redirec$on GET Redirect GET OK Advantages Fine- grain control Selec$on based on client IP address Disadvantages Extra round- trips for TCP connec$on to server Overhead on the server #9 Mul$media Networking 10
11 Server Selec$on Mechanism Rou$ng Anycast rou$ng 1.2.3.0/24 1.2.3.0/24 Advantages No extra round trips Route to nearby server Disadvantages Does not consider network or server load Different packets may go to different servers Used only for simple request- response apps #9 Mul$media Networking 11
DNS query Server Selec$on Mechanism Naming DNS- based server selec$on local DNS server 1.2.3.4 1.2.3.5 Advantages Avoid TCP set- up delay DNS caching reduces overhead Rela$vely fine control Disadvantage Based on IP address of local DNS server Hidden load effect DNS TTL limits adapta$on #9 Mul$media Networking 12
How Akamai Works
Akamai Sta$s$cs Distributed servers Servers: ~61,000 Networks: ~1,000 Countries: ~70 Many customers Apple, BBC, FOX, GM IBM, MTV, NASA, NBC, Client requests Hundreds of billions per day Half in the top 45 networks 15-20% of all Web traffic worldwide #9 Mul$media Networking 14
15 How Akamai Uses DNS cnn.com (content provider) DNS root server GET index. html http://cache.cnn.com/foo.jpg 1 2 HTTP HTTP Akamai global DNS server Akamai regional DNS server Akamai cluster End user Nearby Akamai cluster #9 Mul$media Networking 15
16 How Akamai Uses DNS cnn.com (content provider) DNS root server 1 2 HTTP DNS lookup cache.cnn.com 3 4ALIAS: g.akamai.net Akamai global DNS server Akamai regional DNS server Akamai cluster End user Nearby Akamai cluster #9 Mul$media Networking 16
17 How Akamai Uses DNS cnn.com (content provider) DNS root server 1 2 HTTP End user 3 4 6 ALIAS a73.g.akamai.net DNS lookup g.akamai.net 5 Akamai global DNS server Akamai regional DNS server Akamai cluster Nearby Akamai cluster #9 Mul$media Networking 17
18 How Akamai Uses DNS cnn.com (content provider) DNS root server 1 2 HTTP End user 3 4 6 DNS a73.g.akamai.net Address 1.2.3.4 5 7 8 Akamai global DNS server Akamai regional DNS server Akamai cluster Nearby Akamai cluster #9 Mul$media Networking 18
19 How Akamai Uses DNS cnn.com (content provider) DNS root server 1 2 HTTP 3 5 4 6 7 Akamai global DNS server Akamai regional DNS server Akamai cluster 8 End user GET /foo.jpg Host: cache.cnn.com 9 Nearby Akamai cluster #9 Mul$media Networking 19
20 How Akamai Uses DNS cnn.com (content provider) DNS root server GET foo.jpg 11 12 1 2 HTTP 3 5 4 6 7 Akamai global DNS server Akamai regional DNS server Akamai cluster 8 End user GET /foo.jpg Host: cache.cnn.com 9 Nearby Akamai cluster #9 Mul$media Networking 20
21 How Akamai Uses DNS cnn.com (content provider) DNS root server 11 12 1 2 HTTP 3 5 4 6 7 Akamai global DNS server Akamai regional DNS server Akamai cluster 8 End user 9 10 Nearby Akamai cluster #9 Mul$media Networking 21
How Akamai Works: Cache Hit cnn.com (content provider) DNS root server Akamai server GET index. html 1 2 End user 9 10 7 8 GET /cnn.com/foo.jpg Akamai high-level DNS server Akamai low-level DNS server Nearby hash-chosen Akamai server #9 Mul$media Networking 22
Mapping System Equivalence classes of IP addresses IP addresses experiencing similar performance Quan$fy how well they connect to each other Collect and combine measurements Ping, traceroute, BGP routes, server logs E.g., over 100 TB of logs per days Network latency, loss, and connec$vity #9 Mul$media Networking 23
Mapping System Map each IP class to a preferred server cluster Based on performance, cluster health, etc. Updated roughly every minute Map client request to a server in the cluster Load balancer selects a specific server E.g., to maximize the cache hit rate #9 Mul$media Networking 24
Adap$ng to Failures Failing hard drive on a server Suspends aqer finishing in progress requests Failed server Another server takes over for the IP address Low- level map updated quickly Failed cluster High- level map updated quickly Failed path to customer s origin server Route packets through an intermediate node #9 Mul$media Networking 25
Akamai Transport Op$miza$ons Bad Internet routes Overlay rou$ng through an intermediate server Packet loss Sending redundant data over mul$ple paths TCP connec$on set- up/teardown Pools of persistent connec$ons TCP conges$on window and round- trip $me Es$mates based on network latency measurements #9 Mul$media Networking 26
Akamai Applica$on Op$miza$ons Slow download of embedded objects Prefetch when HTML page is requested Large objects Content compression Slow applica$ons Moving applica$ons to edge servers E.g., content aggrega$on and transforma$on E.g., sta$c databases (e.g., product catalogs) E.g. batching and valida$ng input on Web forms #9 Mul$media Networking 27
Conclusion Content distribu$on is hard Many, diverse, changing objects Clients distributed all over the world Reducing latency is king Contribu$on distribu$on solu$ons Reac$ve caching Proac$ve content distribu$on networks #9 Mul$media Networking 28
CDN: simple content access scenario Bob (client) requests video hrp://netcinema.com/6y7b23v video stored in CDN at hrp://kingcdn.com/netc6y&b23v 1. Bob gets URL for for video http://netcinema.com/6y7b23v from netcinema.com web page 1 2 6. request video from 5 KINGCDN server, streamed via HTTP netcinema.com 3. netcinema s DNS returns URL http://kingcdn.com/netc6y&b23v 3 2. resolve http://netcinema.com/6y7b23v via Bob s local DNS 4 4&5. Resolve http://kingcdn.com/netc6y&b23 via KingCDN s authoritative DNS, which returns IP address of KingCDN server with video netcinema s authorative DNS KingCDN.com KingCDN authoritative DNS #9 Mul$media Networking 29
Case study: Nedlix 30% downstream US traffic in 2011 owns very lirle infrastructure, uses 3 rd party services: own registra$on, payment servers Amazon (3 rd party) cloud services: Nedlix uploads studio master to Amazon cloud create mul$ple version of movie (different endodings) in cloud upload versions from cloud to CDNs Cloud hosts Nedlix web pages for user browsing three 3 rd party CDNs host/stream Nedlix content: Akamai, Limelight, Level- 3 #9 Mul$media Networking 30
Case study: Nedlix Amazon cloud upload copies of multiple versions of video to CDNs Akamai CDN Netflix registration, accounting servers 1 1. Bob manages Netflix account 2. Bob browses Netflix video 2 3 3. Manifest file returned for requested video 4. DASH streaming Limelight CDN Level-3 CDN #9 Mul$media Networking 31