Peer-to-Peer Streaming Systems Behzad Akbari 1
Outline Introduction Scaleable Streaming Approaches Application Layer Multicast Content Distribution Networks Peer-to-Peer Streaming Metrics Current Issues 2
Introduction What is P2P systems? P2P refers to applications that take advantage of resources (storage, cycles, content, human presence) available at the end systems of the internet. What is overlay networks? Overlay networks refer to networks that are constructed on top of another network (e.g. IP). What is P2P overlay network? Any overlay network that is constructed by the Internet peers in the application layer on top of the IP network. 3
Peer-to-Peer Applications P2P file sharing Napster, Gnutella, Kaza, Emule, Edonkey, Bittorent, etc. Application layer multicasting P2P media streaming Content distribution Distributed caching Distributed storage Distributed backup systems Grid computing 4
Peer-to-Peer networks Advent of multimedia technology and broadband surge lead to excessive usage of P2P application that includes: Sharing of large files over the internet Video-on-Demand (VoD) applications P2P media streaming applications BitTorrent like P2P models suitable for bulk file transfer P2P file sharing has no issues like QoS: No need to playback the media in real time Downloading takes long time, many users do it overnight 5
P2P Media Streaming Media streaming extremely expensive 1 hour of video encoded at 300Kbps = 128.7 MB Serving 1000 users would require 125.68 GB Media Server cannot serve everybody in swarm In P2P Streaming: Peers form an overlay of nodes on top of www internet Nodes in the overlay connected by direct paths (virtual or logical links), in reality, connected by many physical links in the underlying network Nodes offer their uplink bandwidth while downloading and viewing the media content Takes load off the server Scalable 6
P2P media streaming challenges Quality of Service requirements of media streaming application High bandwidth low latency low loss rate High churn rate Users join and leave in between Needs robust network topology to overcome churn Internet dynamics and congestion in the interior of the network Degrades QoS Fairness policies extremely difficult to apply like tit-for-tat High bandwidth users have no incentive to contribute 7
Approaches for scaleable media streaming IP Multicast Has deployment problem Application layer multicast Alternate to IP Multicast Most viable and simple to use and deploy No setup cost Scalable Content Distribution Networks like Akamai Expensive Only large infrastructure can afford Peer-to-Peer mesh networks 8
IP Multicast Relies on network routers Pros Cons Bandwidth efficiency Lack of scalable inter-domain multicast routing protocols Require global deployment of multicast-capable routers Lack of practical pricing models Examples: DVMRP/PIM-DM, CBT, PIM-SM, MOSPF, PIM-SSM, 9
Multi-unicast vs. IP Multicast Unicast IP Multicast 10
Application Layer Multicast (ALM) IP Multicast is not globally deployed. Application Layer/Level Multicast (or Overlay Multicast) is hence proposed. Multicasting implemented at end hosts instead of network routers Nodes form unicast channels or tunnels between them S E1 Unicast Unicast R1 R2 Unicast E2 E3 11
Multicast 12
ALM - Benefits Easy to deploy No change to network infrastructure Programmable end-hosts Overlay construction algorithms at end hosts can be easily applied Application-specific customizations 13
ALM Methodologies Tree Based Content flows from server to nodes in a tree like fashion, every node forwards the content to its children, which in turn forward to their children One point of failure for a complete subtree High recovery time Tree Base Approaches: NICE, SpreadIT, Zigzag Mesh Based Overcomes tree based flaws Nodes maintain state information of many nodes High control overhead Mesh Based approaches: Narada and ESM from CMU. 14
Tree Based ALM 15
Mesh Based ALM 16
Content Distribution Networks (CDNs) CDN nodes deployed in multiple locations, often over multiple backbones These nodes cooperate with each other to satisfy an end user s request User request is sent to nearest CDN node, which has a cached copy QoS improves as end user receives best possible connection Yahoo mail uses Akamai 17
Peer-to-Peer Streaming Model Media content is broken down in small pieces and disseminated in the swarm Neighboring nodes use Gossip protocol to exchange buffer information Nodes trade unavailable pieces Robust and scalable, but more delay Most noted approach in recent years: CoolStreaming PPLive, SOPCast, Fiedian, TV Ants are derivates of CoolStreaming Proprietary and working philosophy not published Reverse Engineered and measurement studies released 18
P2P Based Streaming Model Server 5 2 1 4 3 1 3 19
CoolStreaming Files is chopped by server and disseminated in the swarm Node upon arrival obtain a peerlist of 40 nodes from the server Nodes contact these nodes for media content In steady state, every node has typically 4-8 neighbors, it periodically shares it buffer content map with neighbors Nodes exchange the unavailable content Real world deployed and highly successful system 20
ALM and P2P Media Streaming Application Layer Multicast Peer-to-Peer [CoolStreaming, PPLive, SOPCast,TV Ants, Feidian] Tree Based Mesh Based [NICE, ZigZag, SpreadIT] [ESM, Narada] 21
Metrics Quality of Service Jitter less transmission Low end to end latency Network efficiency Uplink utilization High uplink throughput leads to scalable P2P systems Robustness and Reliability Churn, Node failure or departure should not affect QoS Scalability Fairness Determined in terms of content served (Share Ratio) No user should be forced to upload much more than what it has downloaded Security Implicitly affects above metrics 22
Quality of Service Most important metric Jitter: Unavailability of stream content at play time causes jitter Jitter less transmission ensures good media playback Continuous supply of stream content ensures no jitters Latency: Difference in time between playback at server and user Lower latency keeps users interested A live event viz. Soccer match would lose importance in crucial moments if the transmission is delayed Reducing hop count reduces latency 23
Network efficiency The delay between the source and receivers is small At the same time, the number of redundant packets on any physical link should be low Stan2 CMU Stan2 CMU Stan2 CMU Stan1 Stan1 Stan1 Berk1 Gatech Berk1 Gatech Berk1 Gatech Berk2 High latency Berk2 High degree (unicast) Berk2 Efficient overlay 24
Physical Link Stress (PLS) The number of identical copies of a packet that traverse a physical link. Indicates the bandwidth inefficiency Example: S E1 PLS for link S-R1 is 2. Average PLS is 7/5. R1 R2 E2 E3 25
Relative Delay Penalty (RDP or Stretch) The ratio of the delay in the overlay with the delay in the direct unicast path. Indicates the delay inefficiency Example: Overlay delay for the path from S to E3 is 60 ms. Unicast delay is 40 ms. Therefore, the RDP for E3 is 1.5 ( = 60 ms / 40 ms). S E2 10 ms 10 ms R1 R2 20 ms 10 ms 10 ms E1 E3 26
Uplink Utilization Uplink is the most sparse and important resource in swarm Summation of uplinks of all nodes is the load taken off the server Utilization = Uplink used / Uplink Available Needs effective node organization and topology to maximize uplink utilization High uplink throughput means more bandwidth in the swarm and hence it leads to scalable P2P systems 27
Robustness and Reliability A Robust and Reliable P2P system should be able to support with an acceptable levels of QoS under following conditions: High churn Node failure Congestion in the interior of the network Affects QoS Efficient peering techniques and node topology ensures robust and reliable P2P networks 28
Scalability Serve as many users as possible with an acceptable level of QoS Increasing number of nodes should not degrade QoS An effective overlay node topology and high uplink throughput ensures scalable systems 29
Fairness Measured in terms of content served to the swarm Share Ratio = Uploaded Volume / Downloaded Volume Randomness in swarm causes severe disparity Many nodes upload huge volume of content Many nodes get a free ride with no or very less contribution Must have an incentive for an end user to contribute P2P file sharing system like BitTorrent use tit-for-tat policy to stop free riding Not easy to use it in Streaming as nodes procure pieces in real time and applying tit-for-tat can cause delays 30
Current Issues High buffering time for P2P streaming Half a minute for popular streaming channels and around 2 minutes for less popular Uneven distribution of uplink bandwidths (Unfairness) Sub Optimal uplink utilization Different peers may have different privileges. A user who pays more or is more important should receive better quality of service (e.g. shorter delay, lower loss rate, less jitter, etc). Previous overlay protocols have not sufficiently considered service differentiation based on user privilege and requirement 31
Service differentiation example (distance learning) Lecturer (Source node) Student (More important node) Auditor (Less important node) Traditional Important streaming nodes will system receive doesn t better quality consider of service the difference (e.g. shorter of user s delay inrequirement. this example). 32
References A. Ganjam and H. Zhang, Internet Multicast Video Delivery, Proceeding of the IEEE, Vol. 93, No. 1, pp. 159-170, January 2005. X. Zhang, J. Liu, B. Li, and T.-S. Peter Yum, CoolStreaming/DONet: A data-driven overlay network for efficient live media streaming, in Proc. IEEE INFOCOM 05, March 2005. Y. Chu, S. G. Rao, and H. Zhang, A case for end system multicast, ACM SIGMETRICS 00, June 2000. Kan-Leung Cheng, Xing Jin and S.-H. Gary Chan, "Offering Differentiated Services in Peer-to-Peer Multimedia Multicast," in Proceedings of IEEE International Conference on Multimedia & Expo (ICME), Toronto, Canada, 9-12 July 2006. http://en.wikipedia.org/wiki/akamai_technologies http://www.cs.ucf.edu/courses/cis3360/qos_p2p_streaming.ppt http://www.cs.umd.edu/class/spring2007/cmsc818z/cmsc818z_p2p_ Streaming.ppt 33