Schedule of Class Meeng
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
Today’s Outline
- Ways to distribute video online
- – IP Mul$cast
Client-‐server
- – P2P Media Streaming
- – – CDN (Content Delivery Networks)
Content Delivery/Distribu$on Networks (CDN) Content Distribu$on Network how to stream content (selected challenge:
- from millions of videos) to hundreds of thousands of simultaneous users? single, large “mega-‐server”
- – single point of failure
op,on 1:
- – 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
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)
- – push CDN servers deep into many access
enter deep: networks
- close to users
- used by Akamai, 1700 loca$ons
- – smaller number (10’s) of larger clusters in
bring home: POPs near (but not within) access networks
- used by Limelight
origin server in North America CDN distribution node CDN server in S. America CDN server in Europe CDN server in Asia
- 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
Server Selec$on Policy
- how does CDN DNS select “good”
challenge: 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
client decide -‐ give client a list alterna,ve: of several CDN servers
- let
- – client pings servers, picks “best”
- – Nedlix approach
Server Selec$on Policy
Requires continuous monitoring of
- Live server
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, …
Server Selec$on Mechanism
- Applica$on • Advantages
- – HTTP redirec$on – Fine-‐grain control
- – Selec$on based on client IP address
GET
- Disadvantages
Redirect
- – Extra round-‐trips for
GET
TCP connec$on to server OK
- – Overhead on the server
- Rou$ng
- Advantages
– Anycast rou$ng – No extra round trips
- – Route to nearby server
- Disadvantages
1.2.3.0/24
- – Does not consider network or server load
- – Different packets may go to different servers
- – Used only for simple
1.2.3.0/24 request-‐response apps
Server Selec$on Mechanism
- Naming • Advantages
- – DNS-‐based server – Avoid TCP set-‐up delay selec$on
- – DNS caching reduces overhead
1.2.3.4
- – Rela$vely fine control
- Disadvantage
DNS query
- – Based on IP address of local DNS server
- – “Hidden load” effect
1.2.3.5 local DNS server
- – DNS TTL limits adapta$on
Akamai Sta$s$cs
- Distributed servers • Client requests
- – Servers: ~61,000 – Hundreds of billions per day
- – Networks: ~1,000 &n
- – Half in the top
- – Countries: ~70 45 networks
- Many customers
- – 15-‐20% of all Web
- – Apple, BBC, FOX, GM traffic worldwide
IBM, MTV, NASA, NBC, … HTTP
How Akamai Uses DNS
cnn.com (content provider) DNS root server
1
2 GET index.
html http://cache.cnn.com/foo.jpg HTTP
Akamai cluster
Akamai global DNS server Akamai regional DNS server
Nearby Akamai cluster
End user
How Akamai Uses DNS
cnn.com (content provider) DNS root server
DNS lookup cache.cnn.com
Akamai
Akamai global
cluster
DNS server
3
1
ALIAS:
4 Akamai regional
g.akamai.net DNS server
Nearby Akamai cluster
End user
How Akamai Uses DNS
cnn.com (content provider) DNS root server
DNS lookup g.akamai.net
Akamai
Akamai global
cluster
5 DNS server
3
1
6
4 Akamai regional
ALIAS DNS server a73.g.akamai.net
Nearby Akamai cluster
End user
How Akamai Uses DNS
cnn.com (content provider) DNS root server Akamai
Akamai global
cluster
5 DNS server
3
1
6
4 Akamai regional
7 DNS server
net mai. g.aka
8 a73.
DNS
Nearby
Address
Akamai
1.2.3.4
cluster
End user
How Akamai Uses DNS
cnn.com (content provider) DNS root server Akamai
Akamai global
cluster
5 DNS server
3
1
6
4 Akamai regional
7 DNS server
8 Nearby Akamai
9 cluster
End user GET /foo.jpg Host: cache.cnn.com
How Akamai Uses DNS
cnn.com (content provider) DNS root server
GET foo.jpg
11
12 Akamai
Akamai global
cluster
5 DNS server
3
1
6
4 Akamai regional
7 DNS server
8 Nearby Akamai
9 cluster
End user GET /foo.jpg Host: cache.cnn.com
How Akamai Uses DNS
cnn.com (content provider) DNS root server
11
12 Akamai
Akamai global
cluster
5 DNS server
3
1
6
4 Akamai regional
7 DNS server
8 Nearby Akamai
9 cluster
End user
10
How Akamai Works: Cache Hit
cnn.com (content provider) DNS root server Akamai server
1
2 Akamai high-level
DNS server Akamai low-level DNS server
Nearby hash-chosen Akamai server
7
8
9
10 GET index.
html GET /cnn.com/foo.jpg
End user
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
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
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
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
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
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
Bob (client) requests video /6Y7B23V video stored in CDN at hrp://KingCDN.com/NetC6y&B
23V
1. Bob gets URL for for video http://netcinema.com/6Y7B23V 2. resolve http://netcinema.com/6Y7B23V from netcinema.com via Bob’s local DNS web page
2
1
5 6. request video from
4&5. Resolve KINGCDN server, http://KingCDN.com/NetC6y&B23 streamed via HTTP via KingCDN’s authoritative DNS,
3. netcinema’s DNS returns URL
netcinema.com
which returns IP address of KingCDN
4 http://KingCDN.com/NetC6y&B
23V
server with video
3
netcinema’s KingCDN
Case study: Nedlix
- 30% downstream US traffic in 2011
rd party
- owns very lirle infrastructure, uses 3 services:
- – own registra$on, payment servers
rd party) cloud services:
- – Amazon (3
- 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
rd 3 party CDNs host/stream Nedlix content: three
- – Akamai, Limelight, Level-‐3
Case study: Nedlix
1
1. Bob manages Netflix account
Netflix registration, accounting servers Amazon cloud
Akamai CDN Limelight CDN Level-3 CDN
2
2. Bob browses Netflix video
3
3. Manifest file returned for requested video
4. DASH streaming upload copies of multiple versions of video to CDNs