CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P...

43
CLive: Cloud-Assisted P2P Live Streaming Sep. 4, 2012 1 CLive: Cloud-assisted P2P Live Streaming Amir H. Payberah 1 , Hanna Kavalionak 2 , Vimalkumar Kumaresan 2 Alberto Montresor 2 , Seif Haridi 1 {amir,seif}@sics.se 1 , {name.family}@unitn.it 2

Transcript of CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P...

Page 1: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

CLive: Cloud-Assisted P2P Live StreamingSep. 4, 2012 1

CLive: Cloud-assisted P2P Live Streaming

Amir H. Payberah1, Hanna Kavalionak2, Vimalkumar Kumaresan2

Alberto Montresor2, Seif Haridi1

{amir,seif}@sics.se1, {name.family}@unitn.it2

Page 2: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

CLive: Cloud-Assisted P2P Live StreamingSep. 4, 2012 2

The Problem

Page 3: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 3

Existing P2P Streaming Solutions

Client-Server

Server Farm

Peer-to-Peer

Page 4: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 4

Problem?

● Bottlenecks in P2P video streaming systems: upload bandwidth

● A potential solution: P2P network is assisted by a cloud computing.

Page 5: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 5

Problem?

● Bottlenecks in P2P video streaming systems: upload bandwidth

● A potential solution: P2P network is assisted by a cloud computing.

Cloud is not free

Page 6: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 6

Problem?

● Bottlenecks in P2P video streaming systems: upload bandwidth

● A potential solution: P2P network is assisted by a cloud computing.

Cloud is not freeP2P vs. Cloud

Page 7: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 7

P2P vs. Cloud

● P2P pros and cons P2P resources are cheap

Churn may compromise availability

● Cloud pros and cons Superior availability

Cloud resources are not free

Page 8: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 8

If You Cannot Beat Them, …? ;)

● The cloud as a support group for P2P.

● Reduce the number of (costly) cloud interactions as much as possible.

Page 9: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 9

If You Cannot Beat Them, …? ;)

● The cloud as a support group for P2P.

● Reduce the number of (costly) cloud interactions as much as possible.

The problem to be solved becomes minimizing the economical cost, provided that a set of constraints on QoS is satisfied.

Page 10: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

CLive: Cloud-Assisted P2P Live StreamingSep. 4, 2012 10

CLive

Page 11: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 11

Baseline Model

Source(Clive Manager)

PH

Page 12: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 12

Enhanced Model

Source(Clive Manager)

PH

AHAH

AH

Page 13: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 13

CLive Components

● P2P streaming overlay (swarm)

● Media source

● Passive Helpers

● Active Helpers

● Management component

Page 14: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 14

CLive Components: P2P Streaming Component

● We assume that nodes in the system use a mesh-pull model for data distribution.

● Nodes periodically send their buffer maps to their neighbours.

● The other nodes pull the required chunks from those nodes who own the chunks.

Page 15: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 15

CLive Components: Media Source

● A media source is a node that generates data chunks and pushes them to the swarm.

Page 16: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 16

CLive Components: Passive Helper

● PH is a passive element that plays the role of a data storage, e.g., Amazon S3.

● The source pushes chunks to PH, as they are generated.

● The swarm nodes pull the missed chunks from it.

● We assume that a PH can serve as many requests as it receives.

Page 17: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 17

CLive Components: Active Helper

● AHs are active elements, e.g., Amazon EC2, that cooperate with other swarm nodes to accelerate the data dissemination.

● The source pushes chunks to AH, as they are generated.

● AHs forwards chunks to the swarm and other AH, as they are received.

Page 18: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 18

CLive Components: Management

● Participates in a gossip algorithm to estimate the available resources in the system.

● Adds/removes AHs to/from the system, based on the estimation.

Page 19: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 19

Two Main Questions in CLive?

● How to estimate the extra load in the overlay?

● How to relay the load to cloud with a minimum cost?

Page 20: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 20

Two Main Questions in CLive?

● How to estimate the extra load in the overlay?

● How to relay the load to cloud with a minimum cost?

Page 21: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 21

Main Idea

● Infected nodes: the number of nodes that can be served with the existing resources in the system.

● load = swarm size – infected nodes

Page 22: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 22

The Swarm Size

● The swarm size estimation is easy: gossip-based aggregation

Page 23: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 23

The Infected Nodes

● It is shown that each streamed chunk through mesh overlays follows a tree-based diffusion pattern [1].

● To compute the number of infected nodes, we model a diffusion tree for a chunk and estimate the number of nodes in that tree.

[1] B. Biskupski, M. Schiely, P. Felber, and R. Meier, “Tree-based analysis of mesh overlays for peer-to-peer streaming,” in Proc. of the 8th int. conf. on distr. app. and interoperable systems. Springer, 2008.

Page 24: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 24

Estimate the Number of Nodes in a Tree

● Estimate the tree depth

● Estimate the fan-out distribution

Page 25: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 25

Estimate the Tree Depth (1/2)

● Last Chance Window (LCW): A predefined number of data chunks that must be buffered ahead of the playback point.

● The missed chunks are downloaded directly from the PH, when the number of data chunks that are buffered ahead is less than LCW.

● However, if the LCW buffer is full, nodes pull the required chunks from the swarm.

Page 26: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26

Estimate the Tree Depth (2/2)

● Tdelay: maximum acceptable latency.

● Tlife = Tdelay – Tlcw

● If a node can not receive a chunk in Tlife, it pulls that chunk from PH.

● The tree depth

Dmax = Tlife / Td

Td: average latency among the peers

Generating chunk c at the source

Latest time to play chunk c at a peer

Tlife Tlcw

Tdelay

Page 27: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 27

Estimate the Fan-out Distribution

● The upload bandwidth distribution

Adam2

Gossip-based aggregation

Page 28: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 28

Estimate the Number of Nodes in a Tree

● Estimate the tree depth

● Estimate the fan-out distribution

ntree

Page 29: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 29

The Number of Infected Nodes

● Ninf = (the number of trees).ntree

● The number of trees: source fanout + AHs fanout

Page 30: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 30

Two Main Questions in CLive?

● How to estimate the extra load in the overlay?

● How to relay the load to cloud with a minimum cost?

Page 31: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 31

AH Cost

● AH cost in one round: Cah = Cvm + m.Cchunk

Cvm: virtual machine cost

Cchunk: chuck transfer cost

m: number of chunks that one AH upload per round

Page 32: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 32

PH Cost

● PH cost in one round: Cph = Cstorage + r.(Cchunk + Creq)

Cstorage: the storage cost

Cchunk: chuck transfer cost

Creq: chuck request

r: the number of retrieved chunks from PH in one round

Page 33: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 33

● We define ∂ as the number of peers that is economically reasonable to serve with PH utilization instead to run an additional AH for them.

● ∂ = Cah / Cph

Page 34: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 34

Manage the Cloud Resources

● If load > ∂: add AH

● If load < ∂ - H: remove AH

H: number of peers served by one AH.

● Otherwise don't change AHs.

Page 35: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

CLive: Cloud-Assisted P2P Live StreamingSep. 4, 2012 35

Experiments

Page 36: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 36

Different LCW size

Playback continuity

Playback latency

Page 37: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 37

PH Load

Page 38: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 38

PH Load in Different Churn Rates

Page 39: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 39

Slot Distribution Estimation

Page 40: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 40

Cost

Number of AHs PH load

Total cost

Page 41: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 41

Cost – Real Trace Slot Distribution

Number of AHs PH load

Total cost

Page 42: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 42

Summary

Page 43: CLive: Cloud-assisted P2P Live Streaming · 2020-04-15 · Sep. 4, 2012 CLive: Cloud-Assisted P2P Live Streaming 26 Estimate the Tree Depth (2/2) Tdelay: maximum acceptable latency.

CLive: Cloud-Assisted P2P Live StreamingSep. 4, 2012 43

Any Questions?