Multimedia Networking

Instructor: Carey Williamson Office: ICT 740 Email: carey@cpsc.ucalgary.ca Class Location: MFH 164 Lectures: TR 8:00 – 9:15 Notes derived from “Computer Networking: A Top Down
Approach Featuring the Internet”, 2005, 3rd edition, Jim Kurose, Keith Ross, Addison-Wesley.

Slides are adapted from the companion web site of the book, as modified by Anirban Mahanti (and Carey Williamson).

CPSC 441: Multimedia Networking

1

Goals
Principles Ì Classify multimedia applications Ì Identify the network services the apps need Ì Making the best of best effort service Ì Mechanisms for providing QoS Protocols and Architectures Ì Specific protocols for best-effort Ì Architectures for QoS

CPSC 441: Multimedia Networking

2

Why Study Multimedia Networking?
Ì Exciting, industry relevant research

topic

Ì Multimedia is everywhere Ì Tons of open problems

CPSC 441: Multimedia Networking

3

Outline Ì Multimedia Networking Applications r Stored. interactive r Multimedia over “Best Effort” Internet r Evolving the Internet to support multimedia applications Ì Streaming stored audio and video Ì Scalable Streaming Techniques (Hot Topic) Ì Content Distribution Networks (Hot Topic) Ì Beyond Best Effort CPSC 441: Multimedia Networking 4 . live.

which are loss intolerant but delay tolerant.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 Fundamental characteristics: Ì Typically delay sensitive r r end-to-end delay delay jitter Ì But loss tolerant: Jitter is the variability of packet delays within the same packet stream infrequent losses cause minor glitches Ì Antithesis of data. CPSC 441: Multimedia Networking 5 .

rewind. push slider bar r 10 sec initial delay OK r 1-2 sec until command effect OK r need a separate control protocol? Ì timing constraint for still-to-be transmitted data: in time for playout CPSC 441: Multimedia Networking 6 . FF.Streaming Stored Multimedia (1/2) Ì VCR-like functionality: client can pause.

Streaming Stored Multimedia (2/2) Cumulative data 1. played out at client time streaming: at this time. video sent network delay 3. video recorded 2. while server still sending later part of video CPSC 441: Multimedia Networking 7 . video received. client playing out early part of video.

pause possible! CPSC 441: Multimedia Networking 8 .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.

impair interactivity Ì end-end delay requirements: r Ì session initialization r how does callee advertise its IP address. video conference. port number.Interactive. distributed interactive worlds audio: < 150 msec good. Real-Time Multimedia Ì applications: IP telephony. encoding algorithms? CPSC 441: Multimedia Networking 9 . < 400 msec OK • includes application-layer (packetization) and network delays • higher delays noticeable.

Multimedia Over “Best Effort” Internet Ì TCP/UDP/IP: no guarantees on delay. loss But you said multimedia apps requires ? QoS and level of performance to be ? ? effective! ? ? ? ? ? ? ? ? Today’s multimedia applications implement functionality at the app. layer to mitigate (as best possible) effects of delay. loss CPSC 441: Multimedia Networking 10 .

How to provide better support for Multimedia? (1/4) Integrated services philosophy: Ì architecture for providing QOS guarantees in IP networks for individual flows Ì Fundamental changes in Internet so that apps can reserve end-to-end bandwidth Ì Components of this architecture are r r r r r Admission control Reservation protocol Routing protocol Classifier and route selection Packet scheduler CPSC 441: Multimedia Networking 11 .

and cattle class  Diffserv approach: Ì simple functions in network core.How to provide better support for Multimedia? (2/4) Concerns with Intserv: Ì Scalability: signaling. Courier. maintaining per-flow router state difficult with large number of flows Ì Flexible Service Models: Intserv has only two classes. provide functional components to build service classes CPSC 441: Multimedia Networking 12 . First. business.g.g. relatively complex functions at edge routers (or hosts) Ì Don’t define define service classes.. Desire “qualitative” service classes r r E.. xPress. and normal mail E.

How to provide better support for Multimedia? (3/4) Content Distribution Networks (CDNs) Ì Challenging to stream large files (e. origin server in North America video) from single origin server in real time Ì Solution: replicate content at hundreds of servers throughout Internet r content downloaded to CDN servers ahead of time r placing content “close” to user avoids impairments (loss. America CDN server in Europe CDN server in Asia CPSC 441: Multimedia Networking 13 .g. delay) of sending content over long paths r CDN server typically in edge/access network CDN distribution node CDN server in S..

(a) source duplication. (b) in-network duplication CPSC 441: Multimedia Networking 14 .How to provide better support for Multimedia? (4/4) Multicast/Broadcast duplicate R1 duplicate creation/transmission R1 duplicate R2 R2 R3 R4 R3 R4 (a) (b) Source-duplication versus in-network duplication.

Outline Ì Multimedia Networking Applications Ì Streaming stored audio and video r r r Streaming Architectures Real Time Streaming Protocol Packet Loss Recovery Ì Streaming stored audio and video Ì Scalable Streaming Techniques (Hot Topic) Ì Content Distribution Networks (Hot Topic) Ì Beyond Best Effort CPSC 441: Multimedia Networking 15 .

Internet multimedia: simplest approach Ì audio or video stored in file Ì files transferred as HTTP object received in entirety at client r then passed to player r audio. “pipelining.” long delays until playout! CPSC 441: Multimedia Networking 16 . video not streamed: Ì no.

Streaming vs. Why? CPSC 441: Multimedia Networking 17 . Download of Stored Multimedia Content Ì Download: Receive entire content before playback begins r r High “start-up” delay as media file can be large ~ 4GB for a 2 hour MPEG II movie Ì Streaming: Play the media file while it is being received r r Reasonable “start-up” delays Reception Rate >= playback rate.

Progressive Download Ì browser GETs metafile Ì browser launches player. passing metafile Ì player contacts server Ì server downloads audio/video to player CPSC 441: Multimedia Networking 18 .

Ì Example: Browse the Helix product family http://www.com/products/media_delivery.html CPSC 441: Multimedia Networking 19 .realnetworks.Streaming from a Streaming Server Ì This architecture allows for non-HTTP protocol between server and media player Ì Can also use UDP instead of TCP.

delay jitter CPSC 441: Multimedia Networking 20 . playout delay compensate for network-added delay.Streaming Multimedia: Client Buffering constant bit rate video transmission client video reception buffered video Cumulative data variable network delay constant bit rate video playout at client client playout delay time Ì Client-side buffering.

playout delay compensate for network-added delay. d buffered video Ì Client-side buffering. delay jitter CPSC 441: Multimedia Networking 21 . x(t) constant drain rate.Streaming Multimedia: Client Buffering variable fill rate.

packet loss short playout delay (2-5 seconds) to compensate for network delay jitter Ì Ì error recover: time permitting Ì TCP Ì send at maximum possible rate under TCP Ì fill rate fluctuates due to TCP congestion control Ì larger playout delay: smooth TCP delivery rate Ì HTTP/TCP passes more easily through firewalls CPSC 441: Multimedia Networking 22 . fill rate = constant rate .Streaming Multimedia: UDP or TCP? UDP server sends at rate appropriate for client (oblivious to network congestion !) r often send rate = encoding rate = constant rate r then.

requesting media encoded at 1 Mbps •What fraction of the bottleneck is available to FTP? Talk to Sean Boyden if you want to know more CPSC 441: Multimedia Networking 23 .Fairness of RealVideo Streams (1/2) Media Server Media Client R1 1500 Kbps R2 10 Mbps FTP Server FTP Client •R1-R2 is the bottleneck link •Media Server is DNA Helix Server from RealNetworks •Streaming uses UDP at the transport layer.

Fairness of RealVideo Streams (2/2) CPSC 441: Multimedia Networking 24 .

Outline Ì Multimedia Networking Applications Ì Streaming stored audio and video r r r Streaming Architectures Real Time Streaming Protocol Packet Loss Recovery Ì Streaming stored audio and video Ì Scalable Streaming Techniques (Hot Topic) Ì Content Distribution Networks (Hot Topic) Ì Beyond Best Effort CPSC 441: Multimedia Networking 25 .

fast forward. pause. repositioning. etc. resume. RTSP: RFC 2326 Ì Client-server application layer protocol. Ì For user to control display: rewind. it can be transported over UDP or TCP Ì does not specify how the media player buffers audio/video CPSC 441: Multimedia Networking 26 .Real-Time Streaming Protocol (RTSP) HTTP Ì Does not target multimedia content Ì No commands for fast forward. etc… What it doesn’t do: Ì does not define how audio/video is encapsulated for streaming over network Ì does not restrict how streamed media is transported.

RTSP Example Scenario: Ì metafile communicated to web browser Ì browser launches player Ì player sets up an RTSP control connection. data connection to streaming server CPSC 441: Multimedia Networking 27 .

com/twister/audio.example.en/lofi"> <track type=audio e="DVI4/16000/2" pt="90 DVI4/8000/1" src="rtsp://audio.example.com/twister/audio.com/twister/video"> </group> </session> CPSC 441: Multimedia Networking 28 .en/hifi"> </switch> <track type="video/jpeg" src="rtsp://video.example.Metafile Example <title>Twister</title> <session> <group language=en lipsync> <switch> <track type=audio e="PCMU/8000/1" src = "rtsp://audio.

RTSP Operation CPSC 441: Multimedia Networking 29 .

0 Transport: rtp/udp.0 Session: 4231 S: 200 3 OK CPSC 441: Multimedia Networking 30 .0 200 1 OK Session 4231 C: PLAY rtsp://audio.example.en/lofi RTSP/1. port=3056.example.RTSP Exchange Example C: SETUP rtsp://audio.0 Session: 4231 Range: npt=0C: PAUSE rtsp://audio.com/twister/audio RTSP/1.com/twister/audio.com/twister/audio.example.com/twister/audio. compression. mode=PLAY S: RTSP/1.en/lofi RTSP/1.0 Session: 4231 Range: npt=37 C: TEARDOWN rtsp://audio.en/lofi RTSP/1.example.

Outline Ì Multimedia Networking Applications Ì Streaming stored audio and video r r r Streaming Architectures Real Time Streaming Protocol Packet Loss Recovery Ì Streaming stored audio and video Ì Scalable Streaming Techniques (Hot Topic) Ì Content Distribution Networks (Hot Topic) Ì Beyond Best Effort CPSC 441: Multimedia Networking 31 .

receiver) delays Tolerable delay depends on the application Ì How can packet loss be handled? r We will discuss this next … CPSC 441: Multimedia Networking 32 .Packet Loss Ì network loss: IP datagram lost due to network congestion (router buffer overflow) Ì delay loss: IP datagram arrives too late for playout at receiver r r delays: processing. end-system (sender. queueing in network.

Receiver-based Packet Loss Recovery Ì Generate replacement packet r Packet repetition r Interpolation r Other sophisticated schemes Ì Works when audio/video stream exhibits short- term self-similarity Ì Works for relatively low loss rates (e. breaks down on “bursty” losses CPSC 441: Multimedia Networking 33 .g.. < 5%) Ì Typically.

can reconstruct the original n packets provided at most k packets are lost from the group Works well at high loss rate (for a proper choice of k) Handles “bursty” packet losses Cost: increase in transmission cost (bandwidth) CPSC 441: Multimedia Networking 34 . increasing the bandwidth by factor k/n.Forward Error Correction (FEC) Ì for every group of n packets generate k redundant Ì Ì Ì Ì Ì packets send out n+k packets.

• Can also append (n-1)st and (n-2)nd low-bit rate chunk CPSC 441: Multimedia Networking 35 .Another FEC Example • “piggyback lower quality stream” • Example: send lower resolution audio stream as the redundant information • • Whenever there is non-consecutive loss. the receiver can conceal the loss.

Interleaving: Recovery from packet loss Interleaving Ì Re-sequence packets before transmission Ì Better handling of “burst” losses Ì Results in increased playout delay CPSC 441: Multimedia Networking 36 .

interleaving r retransmissions. time permitting r conceal errors: repeat nearby data CPSC 441: Multimedia Networking 37 .Summary: Internet Multimedia: bag of tricks Ì use UDP to avoid TCP congestion control (delays) for time-sensitive traffic Ì client-side adaptive playout delay: to compensate for delay Ì server side matches stream bandwidth to available client-to-server path bandwidth r r chose among pre-encoded stream rates dynamic server encoding rate Ì error recovery (on top of UDP) r FEC.

Outline Ì Multimedia Networking Applications Ì Streaming stored audio and video Ì Scalable Streaming Techniques Ì Content Distribution Networks Ì Beyond Best Effort CPSC 441: Multimedia Networking 38 .

Streaming Popular Content Ì Consider a popular media file r Playback rate: 1 Mbps r Duration: 90 minutes r Request rate: once every minute Ì How can a video server handle such high loads? r Approach 1: Start a new “stream” for each request r Allocate server and disk I/O bandwidth for each request r Bandwidth required at server= 1 Mbps x 90 CPSC 441: Multimedia Networking 39 .

start-up delay = 30 minutes Bandwidth required = 3 channels = 3 Mbps Channel 1 Channel 2 Channel 3 0 3 0 60 90 120 150 Time (minutes) 180 210 240 40 CPSC 441: Multimedia Networking .Streaming Popular Content using Batching Ì Approach 2: Leverage the multipoint delivery capability of modern networks Ì Playback rate = 1 Mbps. duration = 90 minutes Ì Group requests in non-overlapping intervals of 30 minutes: r r Max.

Batching Issues Ì Bandwidth increases linearly with decrease in start-up delays delays? r Ì Can we reduce or eliminate “start-up” Periodic Broadcast Protocols Stream Merging Protocols r CPSC 441: Multimedia Networking 41 .

2}. start-up delay = 30 minutes r Bandwidth required = 2 channels = 2 Mbps Ì Disadvantage: Requires increased client capabilities Channel 1 1 1 1 1 1 1 Channel 2 0 2 30 2 60 90 Time (minutes) 120 2 150 180 CPSC 441: Multimedia Networking 42 . movie: r Segment 1 = 30 minutes. Segment 2 = 60 minutes Ì Advantage: r Max. For a 90 min.Periodic Broadcast Example Ì Partition the media file into 2 segments with relative sizes {1.

Skyscraper Broadcasts (SB) Ì Divide the file into r [Hua & Sheu 1997] K segments of increasing size Segment size progression: 1. 12. 5. … Ì Multicast each segment on a separate channel at the playback rate Ì Aggregate rate to clients: 2 x playback rate A Channel 1 B CPSC 441: Multimedia Networking 43 . 12. 5. 25. 2. 2.

Comparing Batching and SB Server Bandwidth 1 Mbps 2 Mbps 6 Mbps 10 Mbps Start-up Delay Batching 90 minutes 45 minutes 15 minutes 9 minutes SB 90 minutes 30 minutes 3 minutes 30 seconds Ì Playback rate = 1 Mbps. duration = 90 minutes Ì Limitations of Skyscraper: r r Ad hoc segment size progress Does not work for low client data rates CPSC 441: Multimedia Networking 44 .

2004] Ì Optimized PB protocols (no packet loss recovery) r r r r client fully downloads each segment before playing required server bandwidth near minimal Segment size progression is not ad hoc Works for client data rates < 2 x playback rate Ì extend for packet loss recovery Ì extend for “bursty” packet loss Ì extend for client heterogeneity CPSC 441: Multimedia Networking 45 . 2001.Reliable Periodic Broadcasts (RPB) [Mahanti et al. 2003.

2001.43 CPSC 441: Multimedia Networking 46 .Reliable Periodic Broadcasts (RPB) [Mahanti et al. 2004] Ì Optimized PB protocols (no packet loss recovery) r r r r client fully downloads each segment before playing required server bandwidth near minimal Segment size progression is not ad hoc Works for client data rates < 2 x playback rate Ì extend for packet loss recovery Ì extend for “bursty” packet loss Ì extend for client heterogeneity CPSC 601. 2003.

Optimized Periodic Broadcasts Channel 1 Channel 2 Channel 3 Channel 4 Channel 5 Channel 6 Ì Ì Ì Ì length of first s segments: Ì length of segment k > s: r = segment streaming rate = 1 s = maximum # streams client listens to concurrently = 2 b = client data rate = s x r = 2 k −1 1 1 l k = l1 + r r k −1 ∑l j j =1 1 lk = r j =k − s ∑l j CPSC 441: Multimedia Networking 47 .

Outline Ì Multimedia Networking Applications Ì Streaming stored audio and video Ì Scalable Streaming Techniques Ì Content Distribution Networks Ì Beyond Best Effort CPSC 441: Multimedia Networking 48 .

Content distribution networks (CDNs)
Content replication
Ì Challenging to stream large files

origin server in North America

(e.g., video) from single origin server in real time Ì Solution: replicate content at hundreds of servers throughout Internet r content downloaded to CDN servers ahead of time r placing content “close” to user avoids impairments (loss, delay) of sending content over long paths r CDN server typically in edge/access network

CDN distribution node

CDN server in S. America CDN server in Europe

CDN server in Asia

CPSC 441: Multimedia Networking

49

Content distribution networks (CDNs)
Content replication
Ì CDN (e.g., Akamai) customer
origin server in North America

is the content provider (e.g., CNN) Ì CDN replicates customers’ content in CDN servers. When provider updates content, CDN updates servers

CDN distribution node

CDN server in S. America CDN server in Europe

CDN server in Asia

CPSC 441: Multimedia Networking

50

CDN example
1 2 3

HTTP request for www.foo.com/sports/sports.html

Origin server
DNS query for www.cdn.com

CDNs authoritative DNS server
HTTP request for www.cdn.com/www.foo.com/sports/ruth.gif

Nearby CDN server

origin server (www.foo.com) Ì distributes HTML Ì replaces:
http://www.foo.com/sports.ruth.gif
http://www.cdn.com/www.foo.com/sports/ruth.gif

with

CDN company (cdn.com) Ì distributes gif files Ì uses its authoritative DNS server to route redirect requests
CPSC 441: Multimedia Networking 51

indicating distances from leaf ISPs and CDN nodes Ì when query arrives at authoritative DNS server: r server determines ISP from which query originates r uses “map” to determine best CDN server Ì CDN nodes create application-layer overlay network CPSC 441: Multimedia Networking 52 .More about CDNs routing requests Ì CDN creates a “map”.

Outline Ì Multimedia Networking Applications Ì Streaming stored audio and video Ì Scalable Streaming Techniques Ì Content Distribution Networks Ì Beyond Best Effort CPSC 441: Multimedia Networking 53 .

Integrated Services (Intserv) Architecture Ì architecture for providing QOS guarantees in IP networks for individual flows Ì flow: a distinguishable stream of distinct IP datagrams r r Unidirectional Multiple recipient Ì Components of this architecture: r Admission control r Reservation protocol r Routing protocol r Classifier and route selection r Packet scheduler CPSC 441: Multimedia Networking 54 .

. WFQ) r CPSC 441: Multimedia Networking 55 .Intserv: QoS guarantee scenario Ì Resource reservation r call setup.g. signaling (RSVP) r traffic. QoS declaration r per-element admission control request/ reply QoS-sensitive scheduling (e.

Call Admission Arriving session must : Ì declare its QOS requirement R-spec: defines the QOS being requested Ì characterize traffic it will send into network r T-spec: defines traffic characteristics Ì signaling protocol: needed to carry R-spec and Tspec to routers (where reservation is required) r RSVP r Need Scheduling and Policing Policies to provide QoS CPSC 441: Multimedia Networking 56 .

Ì bucket can hold b tokens r token/sec unless bucket full Ì over interval of length t: number of packets admitted less than or equal to (r t + b). Ì tokens generated at rate CPSC 441: Multimedia Networking 57 .Policing: Token Bucket Token Bucket: limit input to specified Burst Size and Average Rate.

Link Scheduling scheduling: choose next packet to send on link Ì FIFO (first in first out) scheduling: send in order of arrival to queue Ì r r real-world example? discard policy: if packet arrives to full queue: who to discard? • Tail drop: drop arriving packet • priority: drop/remove on priority basis • random: drop/remove randomly CPSC 441: Multimedia Networking 58 .

Round Robin Ì multiple classes Ì cyclically scan class queues. serving one from each class (if available) Ì real world example? CPSC 441: Multimedia Networking 59 .

Weighted Fair Queuing Ì generalized Round Robin Ì each class gets weighted amount of service in each cycle Ì real-world example? CPSC 441: Multimedia Networking 60 .

R D = b/R max CPSC 441: Multimedia Networking 61 .“ Ì Similar to behavior best effort service in an unloaded network arriving traffic token rate. rfc 2212] Guaranteed service: Ì Assured data rate Ì A specified upper bound on Controlled load service: Ì "a quality of service closely approximating queuing delay the QoS that same flow would receive from an unloaded network element. b WFQ per-flow rate. r bucket size.Intserv QoS: Service models [rfc2211.

g..Differentiated Services Concerns with Intserv: Ì Scalability: signaling.g.. provide functional components to build service classes CPSC 441: Multimedia Networking 62 . and cattle class  Diffserv approach: Ì simple functions in network core. First. relatively complex functions at edge routers (or hosts) Ì Don’t define define service classes. xPress. Desire “qualitative” service classes r r E. maintaining per-flow router state difficult with large number of flows Ì Flexible Service Models: Intserv has only two classes. business. and normal mail E. Courier.

Diffserv Architecture Edge router:  per-flow traffic management  Set the DS field. . value r marking scheduling b determines type of service . Core router:  buffering and scheduling based on marking at edge  per-class traffic management CPSC 441: Multimedia Networking 63 . .

Traffic Classification/Conditioning Ì How can packet marks be carried in IPv4 datagrams? Ì Sender may agree to conform to a “traffic profile”. thus a leaky bucket policer may be used at the network edge to enforce r r r Peak rate Average rate Burst size Ì What happens when traffic profile is violated? r Employ traffic shaping? CPSC 441: Multimedia Networking 64 .

Forwarding (PHB) Ì PHB result in a different observable (measurable) forwarding performance behavior Ì PHB does not specify what mechanisms to use to ensure required PHB performance behavior Ì Examples: r r Class A gets x% of outgoing link bandwidth over time intervals of a specified length Class A packets leave first before packets from class B CPSC 441: Multimedia Networking 65 .

PHB’s Defined in Diffserv Ì Expedited Forwarding: pkt departure rate of a class equals or exceeds specified rate r logical link with a minimum guaranteed rate Ì Assured Forwarding: 4 classes of traffic r each guaranteed minimum amount of bandwidth r each with three drop preference partitions CPSC 441: Multimedia Networking 66 .

Deployment Issues Ì Single administrative domain Ì Incremental deployment Ì Traffic policing/shaping complexity Ì Charging models CPSC 441: Multimedia Networking 67 .

signaling ! Ì earlier Internet Signaling protocol: ST-II [RFC 1819] CPSC 441: Multimedia Networking 68 ..Signaling in the Internet connectionless (stateless) forwarding by IP routers best effort service no network signaling protocols in initial IP design + = Ì New requirement: reserve resources along end-to-end path (end system. routers) for QoS for multimedia applications Ì RSVP: Resource Reservation Protocol [RFC 2205] r “ … allow users to communicate requirements to network in robust and efficient way.” i.e.

5. 4. 3.RSVP Design Goals 1. with adaptation to changes in underlying unicast. multicast routes control protocol overhead to grow (at worst) linear in # receivers modular design for heterogeneous underlying technologies CPSC 441: Multimedia Networking 69 . 6. with adaptation to multicast group membership leverage existing multicast/unicast routing. accommodate heterogeneous receivers (different bandwidth along paths) accommodate different applications with different resource requirements make multicast a first class service. 2.

RSVP: does not… Ì specify how resources are to be reserved Ì rather: a mechanism for communicating needs that’s the job of routing protocols signaling decoupled from routing separation of control (signaling) and data (forwarding) planes Ì determine routes packets will take Ì Ì Ì interact with forwarding of packets Ì CPSC 441: Multimedia Networking 70 .

Diffserv CPSC 441: Multimedia Networking 71 .Multimedia Networking: Summary Ì multimedia applications and requirements Ì making the best of today’s best effort service Ì scheduling and policing mechanisms Ì next generation Internet: Intserv. RSVP.