ppt - CSE Labs User Home Pages

advertisement
A Quick Primer on
Multimedia Networking & Content
Distribution Networks
• Introduction to Multimedia Networking
– Classify multimedia applications
– Streaming Stored Multimedia vs. Interactive
Applications
• Content Distribution Networks (CDN)
– key concepts & design challenges
• Large-Scale Video Content Delivery Case studies:
– YouTube & Netflix (see separate slides)
Required Readings:
Relevant chapters/sections from your
csci5211/csci4221 Textbook
CSci5221: Multimedia Networking and CDN
1
Multimedia and Quality of Service
Multimedia applications:
network audio and video
(“continuous media”)
QoS
network provides
application with level of
performance needed for
application to function.
CSci5221: Multimedia Networking and CDN
2
Digital Audio
• Sampling the analog signal
– Sample at some fixed rate
– Each sample is an arbitrary real number
• Quantizing each sample
– Round each sample to one of a finite number of values
– Represent each sample in a fixed number of bits
4 bit representation
(values 0-15)
CSci5221: Multimedia Networking and CDN
3
Audio Examples
• Speech
– Sampling rate: 8000 samples/second
– Sample size: 8 bits per sample
– Rate: 64 kbps
• Compact Disc (CD)
– Sampling rate: 44,100 samples/second
– Sample size: 16 bits per sample
– Rate: 705.6 kbps for mono,
1.411 Mbps for stereo
CSci5221: Multimedia Networking and CDN
4
Why Audio Compression
• Audio data requires too much bandwidth
– Speech: 64 kbps is too high for a dial-up modem user
– Stereo music: 1.411 Mbps exceeds most access rates
• Compression to reduce the size
– Remove redundancy
– Remove details that human tend not to perceive
• Example audio formats
– Speech: GSM (13 kbps), G.729 (8 kbps), and G.723.3 (6.4
and 5.3 kbps)
– Stereo music: MPEG 1 layer 3 (MP3) at 96 kbps, 128
kbps, and 160 kbps
CSci5221: Multimedia Networking and CDN
5
A few words about audio compression
• Analog signal sampled at
constant rate
– telephone: 8,000
samples/sec
– CD music: 44,100
samples/sec
• Each sample quantized, i.e.,
rounded
– e.g., 28=256 possible
quantized values
• Each quantized value
represented by bits
– 8 bits for 256 values
CSci5221: Multimedia Networking and CDN
• Example: 8,000
samples/sec, 256 quantized
values --> 64,000 bps
• Receiver converts it back
to analog signal:
– some quality reduction
Example rates
• CD: 1.411 Mbps
• MP3: 96, 128, 160 kbps
• Internet telephony: 5.3 13 kbps
6
Digital Video
• Sampling the analog signal
– Sample at some fixed rate (e.g., 24 or 30 times per sec)
– Each sample is an image
• Quantizing each sample
– Representing an image as an array of picture elements
– Each pixel is a mixture of colors (red, green, and blue)
– E.g., 24 bits, with 8 bits per color
CSci5221: Multimedia Networking and CDN
7
The
2272 x 1704
hand
CSci5221:
Multimedia
The
320 x 240
hand
8
A few words about video compression
• Video is sequence of
images displayed at
constant rate
Examples:
• MPEG 1 (CD-ROM) 1.5
Mbps
– e.g. 24 images/sec
• MPEG2 (DVD) 3-6 Mbps
• Digital image is array of
• MPEG4 (often used in
pixels
Internet, < 1 Mbps)
• Each pixel represented
Research:
by bits
• Layered (scalable) video
• Redundancy
– spatial
– temporal
CSci5221: Multimedia Networking and CDN
– adapt layers to available
bandwidth
9
Video Compression: Within an Image
• Image compression
– Exploit spatial redundancy (e.g., regions of same color)
– Exploit aspects humans tend not to notice
• Common image compression formats
– Joint Pictures Expert Group (JPEG)
– Graphical Interchange Format (GIF)
Uncompressed: 167 KB
Good quality: 46 KB
CSci5221: Multimedia Networking and CDN
Poor quality: 9 KB
10
Video Compression: Across Images
• Compression across images
– Exploit temporal redundancy across images
• Common video compression formats
– MPEG 1: CD-ROM quality video (1.5 Mbps)
– MPEG 2: high-quality DVD video (3-6 Mbps)
– Proprietary protocols like QuickTime and RealNetworks
CSci5221: Multimedia Networking and CDN
11
MM Networking Applications
Classes of MM applications:
1) Streaming stored audio
and video
2) Streaming live audio and
video
3) Real-time interactive
audio and video
Jitter is the variability
of packet delays within
the same packet stream
CSci5221: Multimedia Networking and CDN
Fundamental
characteristics:
• Typically delay sensitive
– end-to-end delay
– delay jitter
• But loss tolerant:
infrequent losses cause
minor glitches
• Antithesis of data,
which are loss intolerant
but delay tolerant.
12
Application Classes
• Streaming
– Clients request audio/video files from servers
and pipeline reception over the network and
display
– Interactive: user can control operation (similar
to VCR: pause, resume, fast forward, rewind,
etc.)
– Delay: from client request until display start
can be 1 to 10 seconds
CSci5221: Multimedia Networking and CDN
13
Application Classes (more)
• Unidirectional Real-Time (or “broadcasing”):
– similar to existing TV and radio stations, but
delivery on the network
– Non-interactive, just listen/view
• Interactive Real-Time :
– Phone conversation or video conference
– More stringent delay requirement than Streaming
and Unidirectional because of real-time nature
– Video: < 150 msec acceptable
– Audio: < 150 msec good, <400 msec acceptable
CSci5221: Multimedia Networking and CDN
14
Streaming Stored Multimedia
Streaming:
• media stored at source
• transmitted to client
• streaming: client playout begins
before all data has arrived
• timing constraint for still-to-be
transmitted data: in time for playout
CSci5221: Multimedia Networking and CDN
15
Internet Multimedia: Simplest Approach
• audio or video stored in file
• files transferred as HTTP object
– received in entirety at client
– then passed to player
audio, video not streamed:
• no, “pipelining,” long delays until playout!
CSci5221: Multimedia Networking and CDN
16
Internet multimedia: Streaming Approach
• browser GETs metafile
• browser launches player, passing metafile
• player contacts server
• server streams audio/video to player
CSci5221: Multimedia Networking and CDN
17
Streaming Stored Multimedia:
network delay & video playback
1. video
recorded
2. video
sent
network
delay
3. video received,
played out at client
time
streaming: at this time, client
playing out early part of video,
while server still sending later
part of video
CSci5221: Multimedia Networking and CDN
18
Streaming Multimedia:
adaptive client buffering
variable
network
delay
client video
reception
constant bit
rate video
playout at client
buffered
video
constant bit
rate video
transmission
client playout
delay
time
• Client-side buffering, playout delay compensate
for network-added delay, delay jitter
CSci5221: Multimedia Networking and CDN
19
Streaming Stored Multimedia:
Interactivity
• VCR-like functionality: client can
pause, rewind, FF, push slider bar
– 10 sec initial delay OK
– 1-2 sec until command effect OK
• timing constraint for still-to-be transmitted data:
in time for playout
CSci5221: Multimedia Networking and CDN
20
Streaming Live Multimedia
Examples:
• Internet radio talk show
• Live sporting event
Streaming
• playback buffer
• playback can lag tens of seconds after
transmission
• still have timing constraint
Interactivity
• fast forward impossible
• rewind, pause possible!
CSci5221: Multimedia Networking and CDN
21
Interactive, Real-Time Multimedia
• applications: IP telephony,
video conference, distributed
interactive worlds
• end-end delay requirements:
– audio: < 150 msec good, < 400 msec OK
• includes application-level (packetization) and network
delays
• higher delays noticeable, impair interactivity
• session initialization
– how does callee advertise its IP address, port number,
encoding algorithms?
CSci5221: Multimedia Networking and CDN
22
Multimedia Over Today’s Internet
TCP/UDP/IP: “best-effort service”
• no guarantees on delay, loss
?
?
?
?
?
?
But you said multimedia apps requires ?
QoS and level of performance to be
?
? effective!
?
?
Today’s Internet multimedia applications
use application-level techniques to mitigate
(as best possible) effects of delay, loss
CSci5221: Multimedia Networking and CDN
23
Challenges
• TCP/UDP/IP suite provides best-effort, no
guarantees on expectation or variance of packet
delay
• Streaming applications delay of 5 to 10 seconds is
typical and has been acceptable, but performance
deteriorate if links are congested (transoceanic)
• Real-Time Interactive requirements on delay and
its jitter have been satisfied by over-provisioning
(providing plenty of bandwidth), what will happen
when the load increases?...
CSci5221: Multimedia Networking and CDN
24
Streaming Stored/Live Multimedia
(esp. video): Application-Level Techniques
Application-level streaming
techniques for making the
best out of best-effort
service:
– dividing a long video into
chunks of smaller sizes
– client side buffering
– multiple encodings of each
video chunks
Media Player
•
•
•
•
jitter removal
decompression
error concealment
graphical user interface
w/ controls for
interactivity
and with the help of CDNs!
CSci5221: Multimedia Networking and CDN
25
Content Distribution Networks
CDN: -- an application overlay (e.g., Akamai)
Design Space
• Caching (data-driven, passive)
– explicit
– transparent (hijacking connections)
• Replication (pro-active)
– server farms
– geographically dispersed (CDN)
Three Main CDN Providers (in North America, Europe):
• Akamai, Limelight, Level 3 CDN
CSci5221: Multimedia Networking and CDN
26
CDNs: Dealing with (Internet) Scale
Recall: one single “mega-server” can’t possibly handle all
requests for popular service
DNS
not enough bandwidth: Netflix video streaming at 2
Mbps per connection
 only 5000 connections over fastest possible
(10Gbs) connection to Internet at one server
 30 Million Netflix customers
too far from some users: halfway around the globe to
someone
reliability: single point of failure
A single server
doesn’t “scale”
CSci5221: Multimedia Networking and CDN
27
Why CDNs
• challenge: how to stream content (selected
from millions of videos) to hundreds of
thousands of simultaneous users?
• option 1: single, large “mega-server”
–
–
–
–
single point of failure
point of network congestion
long path to distant clients
multiple copies of video sent over outgoing link
….quite simply: this solution doesn’t scale
CSci5221: Multimedia Networking and CDN
28
Why CDNs
• challenge: how to stream content (selected from
millions of videos) to hundreds of thousands of
simultaneous users?
• option 2: store/serve multiple copies of videos at
multiple geographically distributed sites (CDN)
– enter deep: push CDN servers deep into many access
networks
• close to users
• used by Akamai, 1700 locations
– bring home: smaller number (10’s) of larger clusters in
POPs near (but not within) access networks
• used by Limelight
CSci5221: Multimedia Networking and CDN
29
CDN: Schematic Illustration
aaa.com
bbb.com
ccc.com
Backend
servers
Cache
Geographically
distributed
surrogate
servers
Redirectors
Cl ients
CSci5221: Multimedia Networking and CDN
30
Redirection Overlay
Geographically distributed server clusters
R
R
R
R
Internet Backbone
R
R
R
R
clients
CSci5221: Multimedia Networking and CDN
Distributed request-redirectors
31
CDN: “simple” content access
scenario
Bob (client) requests video http://netcinema.com/6Y7B23V
 video stored in CDN at http://KingCDN.com/NetC6y&B23V
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
2
web page
1
6. request video from 5
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
4
which returns IP address of KIingCDN
http://KingCDN.com/NetC6y&B23V
server with video
3
netcinema’s
authorative DNS
KingCDN.com
KingCDN
authoritative DNS
32
Redirection Techniques
• URL Rewriting: embedded links
• HTTP redirection: requires an extra round trip
• DNS (anycast): one name maps onto many
addresses
• esp. useful for finding nearby servers & (coarse-grained)
locality-based load balancing
• Question: how to figure out geo-location of users (at DNS
query time)?
– works for both servers and reverse proxies
• Router: IP Anycast
– announce (via BGP) the same IP address
prefixes at multiple locations
• “Layer 4/7” (application) switches
– one address, select a server (reverse proxy)
– content-based routing (near client)
CSci5221: Multimedia Networking and CDN
33
CDN Cluster Selection Strategy
• 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,
reporting results to CDN DNS)
• alternative: let client decide - give client a
list of several CDN servers
– client pings servers, picks “best”
CSci5221: Multimedia Networking and CDN
34
Akamai CDN: quickie
pioneered creation of CDNs circa 2000
now: 61,000 servers in 1,000 networks in
70 countries
delivers est 15-20% of all Internet traffic
runs its own DNS service (alternative to
public root, TLD, hierarchy)
hundreds of billions of Internet
interactions daily
more shortly….
CSci5221: Multimedia Networking and CDN
3-35
Akamai CDN Overview
• More than 10s of thousands servers in more 1000s
networks globally
• Support a variety of services
– DNS resolution, web content delivery, web search, large
software update, media content distribution (music,
video, etc), …
basic operations
– user, local
DNS &
Akamai DNS
– User, Akamai
servers &
content
providers
local DNS
server
CSci5221: Multimedia Networking and CDN
36
Akamai CDN Architecture
CSci5221: Multimedia Networking and CDN
37
Case Study: Netflix
•
•
•
•
30% downstream US traffic in 2013
$1B quarterly revenue
2B hours viewing streamed video
owns very little infrastructure, uses 3rd party
services:
– own registration, payment servers
– Amazon (3rd party) cloud services:
• Netflix uploads studio master to Amazon cloud
• create multiple version of movie (different
encodings) in cloud, move to CDNs
• Cloud hosts Netflix web pages for user browsing
CSci5221: Multimedia Networking and CDN
http://www.statisticbrain.com/netflix-statistics/
38
Case Study: Netflix
• uses three 3rd party CDNs to store, host,
stream Netflix content:
 Akamai, Limelight, Level-3
 can play each of the CDNs against each other in terms of
customer experience
 developing its own CDN (2012)
CSci5221: Multimedia Networking and CDN
39
Case Study: Netflix
Amazon cloud
Netflix registration,
accounting servers
2. Bob browses
Netflix video
2
3
upload copies of
multiple versions of
video to CDNs
3. Manifest file
returned for
requested video
Akamai CDN
Limelight CDN
1
1. Bob manages
Netflix account
4. DASH
streaming
Level-3 CDN
CSci5221: Multimedia Networking and CDN
40
Streaming Multimedia: DASH
• DASH: Dynamic, Adaptive Streaming over HTTP
• server:
– divides video file into multiple chunks
– each chunk stored, encoded at different rates
– manifest file: provides URLs for different chunks
• client:
– periodically measures server-to-client bandwidth
– consulting manifest, requests one chunk at a time
• chooses maximum coding rate sustainable given
current bandwidth
• can choose different coding rates at different points
in time (depending on available bandwidth at time)
CSci5221: Multimedia Networking and CDN
41
Streaming Multimedia: DASH
• manifest file: provides URLs for different
chunks
Segment Info
Initialization Segment
http://www.e.com/ahs-5.3gp
Media Presentation
Media Segment 1
Period,
Period, start=0s
…
Period, start=100s
•start=100
•baseURL=http://www.e.com/
…
Representation 1
Representation 1
•bandwidth=500kbit/s
•width 640, height 480
…
500kbit/s
Segment Info
…
Representation 2
Period, start=295s
100kbit/s
duration=10s
Template:
./ahs-5-$Index$.3gs
…
…
start=0s
http://www.e.com/ahs-5Media 1.3gs
Segment 2
start=10s
http://www.e.com/ahs-5Media 2.3gs
Segment 3
start=20s
http://www.e.com/ahs-53.3gh
…
Media Segment 20
start=190s
http://www.e.com/ahs-5-20.3gs
CSci5221: Multimedia Networking and CDN
Ack & ©: Thomas Stockhammer
42
Streaming Multimedia: DASH
• DASH: Dynamic, Adaptive Streaming over
HTTP
• “intelligence” at client: client determines
– when to request chunk (so that buffer starvation, or
overflow does not occur)
– what encoding rate to request (higher quality when more
bandwidth available)
– where to request chunk (can request from URL server
that is “close” to client or has high available bandwidth)
CSci5221: Multimedia Networking and CDN
43
Let’s check out Netflix:

use wireshark to capture and view packets
being sent to/from my laptop

you’re not responsible for knowing how to use it,
but it’s a lot of fun
• logging in (authorization), content selection
– main webpage hosted by amazon cloud?
– use whois to see who server is
• select video and begin playing
– use whois to see who is serving video
– how far away is server (use traceroute, no info?
Ip2location.com)
CSci5221: Multimedia Networking and CDN
44
Netflix: user adaptation to bandwidth
changes
• Question: how does Netflix client adapt to
changes in bandwidth (due to changing
congestion levels on network path)
• two client-based alternatives:
– get video from new CDN server (over new path)?
– change video streaming rate via DASH?
• experiment:
– connect to netflix
– systematically decrease bandwith from server to client
– measure how client responds: decrease rate or change servers
CSci5221: Multimedia Networking and CDN
3-45
Netflix experiment
Akamai CDN
Public Internet
Bob’s home
network
Adjust bandwidth to Bob’s computer,
see how Netflix responds
Vijay Kumar Adhikari, Yang Guo, Fang Hao, Matteo Varvello,
Volker Hilt, Moritz Steiner, Zhi-Li Zhang, “Unreeling Netflix:
Understanding and Improving Multi-CDN Movie Delivery”,
INFOCOM, Orlando, FL, USA, March, 2012.
Limelight CDN
Level-3 CDN
CSci5221: Multimedia Networking and CDN
46
Netflix experiment
Netflix seems to dynamically use alternate CDNs only for fail-over
CSci5221: Multimedia Networking and CDN
47
Netflix experiment
Question: Does any one of Netflix’s three CDN
providers systematically outperform the other?
Answer: Non one CSN is uniformly better
Measurements taken at different locations: which CDN provides best Netflix service?
48
Video on Demand:
business perspective

home video delivery: quickly shifted from video
stores (e.g., Blockbuster) to Internet streaming
(Netflix, Amazon, Comcast, Apple, Google, AT&T, Hulu,
Verizon)
– Blockbuster: chapter11 bankruptcy, 2010
– Netflix DVD service: 15M in 2011, 7.5M in 2013
– Netflix VoD: 30M in 2013, adding ~2M customers annually
• two streaming business models both sending TV using
IP packets:
– over the top (OTT)
– in-network (Comcast Xfinity)
CSci5221: Multimedia Networking and CDN
49
Video on Demand: OTT
Over-the-top: VoD provider uses public Internet
to deliver content (augmented by CDNs)
 use Internet best effort service (no
guarantees)
 ISPs (AT&T, Comcast, Version) relegated to
role of “bit pipes” - carrying traffic but not
offering “services”
 unicast HTTP (e.g., DASH)
 minimal infrastructure costs
 user subscription fee or advertising revenue
CSci5221: Multimedia Networking and CDN
50
Video on Demand: in-network
in-network: access network owner (Comcast,
Verizon) provides VoD service to its customers
 high-quality user experience (QoE)
because ISP manages network
 servers in same edge network as viewers
 efficient network use: multicast possible
(one packet to many receivers)
 ISP pays infrastructure cost
OTT versus in-network: who will win, and why?
CSci5221: Multimedia Networking and CDN
51
Download