Peer-to-Peer Streaming: An Hierarchical Approach Duc A. Tran (with Kien A. Hua and Tai T. Do) Data Systems Group (UCF)
Roadmap What is P2P? Why P2P Streaming? Problem Statement Solution: ZIGZAG Performance Study Future Work
What is P2P? The sharing of computer resources and services by direct exchange between systems: exchange of information, processing cycles, cache storage, and disk storage for files. P2P uses existing desktop computing power and networking connectivity, allowing economical clients to leverage their collective power to benefit the entire enterprise
P2P Streaming Sharing of network bandwidth Streaming: The user plays the data as as it arrives. Consider a new user A: If A is the first user, A gets the stream from the central site Else, A can get the stream from the central site or a set of users who have already been receiving the stream
Why P2P Streaming? source Oh, I am exhausted! Client/server approach P2P approach
Problem Statement Live media streaming High Liveness Scalability Low Overhead Robustness
Goal 1: High Liveness source Is it too far? Don’t make me a bottleneck! new I want to join fast
Goal 2: Robustness The server is already busy source Too many reconnections!
Goal 3: Low Control Overhead A peer may have to periodically exchange information with others to maintain its position and connections. The overhead of this task should be small and independent of the system size
Our goal: Minimizing the above effects Goal 4: Scalability When more peers join the system: Control overhead may be increased A peer may have to serve more others The P2P tree may be deeper A failure may result in many reconnections Our goal: Minimizing the above effects
Proposed Solution: ZIGZAG The 4 goals are achieved, especially: Peer degree: bounded by a constant Tree height: logarithmic with the system size Control overhead: bounded by a constant (on average) Failure recovery: done regionally, affecting at most a constant number of peers mostly no effect on the server Administrative Organization (AO): A clustering of peers Multicast tree: Built atop the AO based on C-rules
Administrative Organization L 4 2 L S 5 4 1 3 7 1 2 6 L 8 11 3 14 4 17 S 7 29 1 2 20 23 5 26 6 9 10 12 13 15 16 18 19 21 22 24 25 27 28 30 31 others head S: server vice-head Cluster size: [k, 3k], Highest-layer cluster: [2, 3k] (k 4)
Terms Foreign head Foreign inferior Super peer Foreign cluster 1 2 Foreign inferior Foreign head 1 3 4 2 inferior
Connectivity Rules (C-rules) (In this example, k = 4)
C-rules Rule 1: A peer, when not at its highest layer, neither has a link out nor a link in Rule 2: Non-head members of a cluster must receive the stream from their vice-head Rule 3: The vice-head of a cluster, except for the server, must receive the stream from a foreign head
P2P Tree The tree height is at most 2logkN+1 The node degree is at most 6k-3
Control Overhead A peer exchanges soft-state information with Its parent Its children Its clustermates The worst-case control overhead is O(klogkN) The average control overhead is O(k)
Max number of contacts: O(klogkN) Join The new user sends a request to the server The request is forwarded down the tree until reaching a vice-head of a layer-0 cluster of size [k, 3k-1] Goal: to be as close to the server as possible Among children to forward the request, choose Y: Addable(Y) and D(Y)+d(Y,new) is min Max number of contacts: O(klogkN)
Failure Recovery A node X at layer j is down: The parent of X removes its link to X X is vice-head: the layer-j cluster of X needs to a new vice-head The children of X need a new parent to get the stream i < j: Each layer-i cluster of X needs a new head since X no longer exists
Peer 3 fails L L L others head S: server vice-head 2 1 S 4 S 5 4 7 3 1 6 L 8 11 1 2 3 14 4 17 S 7 29 20 23 5 26 6 9 10 12 13 15 16 18 19 21 22 24 25 27 28 30 31 others head S: server vice-head
Failure Recovery (peer 3 fails) others head S: server vice-head Max number of reconnections: 6k-2
Goal: The conditions of C-rules must be met Cluster Maintenance As new peers are added to the administrative organization (AO): A cluster may become oversize => split this cluster into two smaller clusters As peers are removed from the AO: A cluster may become undersize => merge this cluster with another to make a larger cluster Goal: The conditions of C-rules must be met
Cluster Split Split algorithm: run by the head Xhead Max number of reconnections: old cluster size + 6k - 1
Cluster Merge Merge algorithm: run by the head Xhead Max number of reconnections: old cluster size + 6k - 1
Performance Study Underlying network: P2P network: k = 5 10,000 nodes Generated by GT-ITM Generator P2P network: 5000 peers Up to 2500 failures k = 5
Peer Degree
Control Overhead
Failure Overhead
Split Overhead
Merge Overhead
Join Overhead
ZIGZAG versus NICE NICE: (Banerjee et. al., Sigcomm 2002) ZIGZAG: Administrative organization: there is no “vice-head” P2P tree: head is always the parent of its clustermates ZIGZAG: Administrative organization: “head” and “vice-head” P2P tree: “vice-head” is the parent of its non-head clustermates
Peer Degree
Control Overhead
Failure Overhead
Link Stress
Conclusions A clustering method for the administrative organization JOIN FAILURE DEGREE MERGE/SPLIT CONTROL NICE O(klogkN) ZIGZAG O(k) A clustering method for the administrative organization C-rules: A multicast tree construction method Future Work: Multi-send multi-receiver, client heterogeneity, Zigzag in MANETs?