15-441: Computer Networking

55
15-441: Computer Networking Lecture 25: Multicast Challenges, CDN and P2P systems

description

15-441: Computer Networking. Lecture 25: Multicast Challenges, CDN and P2P systems. Overview. Multicast Challenges Content Distribution Networks Peer-to-Peer Networks. Multicast Issues. Reliable transfer ACK/NACK Implosion Exposure Reliable Multicast Protocols - PowerPoint PPT Presentation

Transcript of 15-441: Computer Networking

Page 1: 15-441: Computer Networking

15-441: Computer Networking

Lecture 25: Multicast Challenges, CDN and P2P systems

Page 2: 15-441: Computer Networking

04/19/23 2

Overview

• Multicast Challenges

• Content Distribution Networks

• Peer-to-Peer Networks

Page 3: 15-441: Computer Networking

04/19/23 3

Multicast Issues

• Reliable transfer• ACK/NACK Implosion• Exposure

• Reliable Multicast Protocols• Scalable Reliable Multicast • Reliable Multicast Transport Protocol• Pragmatic General Multicast• Lightweight Multicast Service

• Congestion control

Page 4: 15-441: Computer Networking

04/19/23 4

Loss Recovery

• Sender-reliable• Wait for ACKs from all receivers. Re-send on

timeout or selective ACK• Per receiver state in sender not scalable• ACK implosion

• Receiver-reliable• Receiver NACKs (resend request) lost packet• Does not provide 100% reliability• NACK implosion

Page 5: 15-441: Computer Networking

04/19/23 5

Implosion

R1

S

R3 R4

R2

21

Packet 1 is lost All 4 receivers request a resend

R1

S

R3 R4

R2

Resend request

Page 6: 15-441: Computer Networking

04/19/23 6

Retransmission

• Re-transmitter• Options: sender, other receivers

• How to retransmit• Unicast, multicast, scoped multicast,

retransmission group, …

• Problem: Exposure

Page 7: 15-441: Computer Networking

04/19/23 7

Exposure

Packet 1 does not reach R1;Receiver 1 requests a resend Packet 1 resent to all 4 receivers

R1

S

R3 R4

R2

21

1

Resend request

R1

S

R3 R4

R2

1

Resent packet

Page 8: 15-441: Computer Networking

04/19/23 8

Ideal Recovery Model

Packet 1 reaches R1 but is lost before reaching other Receivers

Only one receiver sends NACK to the nearest S or R with packet

S

R3 R4

R2

2

1

1

R1

S

R3 R4

R2

Resend request

1Resent packet

Repair sent only to those that need packet

R1

Page 9: 15-441: Computer Networking

04/19/23 9

R1

Aside: Using the Routers

S

R3 R4

R2

• Routers do transport level processing:

• Buffer packets• Combine ACKs• Send retransmissions

• Model solves implosion and exposure, but not scalable

• Violates end-to-end argument

NACK

RTX

Router

Page 10: 15-441: Computer Networking

04/19/23 10

Multicast Issues

• Reliable transfer• ACK/NACK Implosion• Exposure

• Reliable Multicast Protocols• Scalable Reliable Multicast • Reliable Multicast Transport Protocol• Pragmatic General Multicast• Lightweight Multicast Service

• Congestion control

Page 11: 15-441: Computer Networking

04/19/23 11

Scalable Reliable Multicast (SRM)

• Originally designed for wb

• Receiver-reliable• NACK-based

• Every member may multicast NACK or retransmission

Page 12: 15-441: Computer Networking

04/19/23 12

SRM Request Suppression

Packet 1 is lost; R1 requests resend to Source and Receivers

Packet 1 is resent; R2 and R3 no longer have to request a resend

R1

S

R3

R2

21

Delay varies by distance

X

Resend request

R1

S

R3

R2

1

X

X

Resent packet

Page 13: 15-441: Computer Networking

04/19/23 13

Request Damping

• Deterministic Suppression• Receivers start timers with delay = C1 x ds,r

• Stochastic Suppression• Start timers with delay = U[0,D2] x ds,r

Page 14: 15-441: Computer Networking

04/19/23 14

SRM Star Topology

Packet 1 is lost; All Receivers request resends Packet 1 is resent to all Receivers

S

R2

21

R3

X

R4

Delay is same length

Resend request S

R2

1

R3 R4

Resent packet

Page 15: 15-441: Computer Networking

04/19/23 15

SRM (Summary)

• NACK/Retransmission suppression• Delay before sending• Delay based on RTT estimation• Deterministic + Stochastic components

• Periodic session messages• Full reliability• Estimation of distance matrix among members

Page 16: 15-441: Computer Networking

04/19/23 16

What’s Missing?

• Losses at link (A,C) causes retransmission to the whole group

• Only retransmit to those members who lost the packet

• [Only request from the nearest responder]

Sender Receiver

A B

E F

S

C D

0.99

0 0

0 0 0

Page 17: 15-441: Computer Networking

04/19/23 17

Local Recovery

• Application-level hierarchy• Fixed v.s. dynamic

• TTL scoped multicast

• Router supported

Page 18: 15-441: Computer Networking

04/19/23 18

Reliable Multicast Transport Protocol (RMTP)

• Reliable Multicast Transport Protocol by Purdue and AT&T Research Labs

• Designed for file dissemination (single-sender)

• Deployed in AT&T’s billing network

Page 19: 15-441: Computer Networking

04/19/23 19

RMTP: Fixed Hierarchy

• Rcvr unicasts periodic ACK to its Designated Receiver (DR)• DR unicasts its own ACK to its parent• Rcvr chooses closest statically configured (DR)• Mcast or unicast retransmission

• Based on percentage of requests• Scoped mcast for local recovery

D R2

S

R3 R4

R1

R R R R

D

D DR R Receiver R* Router

D

R5

R R

Page 20: 15-441: Computer Networking

04/19/23 20

RMTP: Comments

: Heterogeneity • Lossy link or slow receiver will only affect a

local region

: Position of DR critical• Static hierarchy cannot adapt local recovery

zone to loss points

Page 21: 15-441: Computer Networking

04/19/23 21

Pragmatic General Multicast

• Cisco’s reliable multicast protocol

• NACK-based, with suppression

• Repair only forwarded to the NACKers

Page 22: 15-441: Computer Networking

04/19/23 22

Pragmatic General Multicast

Packet 1 reaches only R1; R2, R3, R4 request resends

Packet 1 resent to R2, R3, R4; Not resent to R1

R1

S

R3 R4

R2

1

1 1

1

Resent packet

R1

S

R3 R4

R2

21

1X

Routers remember resend requests

Resend request

Page 23: 15-441: Computer Networking

04/19/23 23

Light-weight Multicast Service (LMS)

• Enhance multicast routing with selective forwarding

• LMS extends router forwarding - what routers are meant to do in the first place

• No packet storing or processing at routers

• Strictly IP: no peeking into higher layers

Page 24: 15-441: Computer Networking

04/19/23 24

LMS: Definitions

• Replier• Receiver volunteered to

answer requests

• Turning point• Where requests start to

move downstream

• Directed mcast

• Mcast to a subtree

R1

S

R3 R6

R2

Replier link

R4 R5

Replier

Turning point

1X

Page 25: 15-441: Computer Networking

04/19/23 25

LMS with Replier Links

Packet 1 reaches only R1; R2 requests resend

Resend requests from each receiver follow replier links

R1

S

R3 R6

R2

21

1X

Resend request

Replier link

R4 R5

Turning pointR1

S

R3 R6

R2

Resend request

Replier link

R4 R5

Page 26: 15-441: Computer Networking

04/19/23 26

LMS with Replier Links

Request from replier links go up towards the Source Packet 1 is resent to all Receivers

R1

S

R3 R6

R2

1

Resent packet

Replier link

R4 R5

R1

S

R3 R6

R2

Resend request

Replier link

R4 R5

Turning point

Page 27: 15-441: Computer Networking

04/19/23 27

Multicast Issues

• Reliable transfer• ACK/NACK Implosion• Exposure

• Reliable Multicast Protocols• Scalable Reliable Multicast • Reliable Multicast Transport Protocol• Pragmatic General Multicast• Lightweight Multicast Service

• Congestion control

Page 28: 15-441: Computer Networking

04/19/23 28

Multicast Congestion Control

• What if receivers have very different bandwidths?

• Send at max?

• Send at min?

• Send at avg?R

R

R

S

???Mb/s

100Mb/s

100Mb/s

1Mb/s

1Mb/s

56Kb/s

R

Page 29: 15-441: Computer Networking

04/19/23 29

Video Adaptation: RLM

• Receiver-driven Layered Multicast

• Layered video encoding

• Each layer uses its own mcast group

• On spare capacity, receivers add a layer

• On congestion, receivers drop a layer

• Join experiments used for shared learning

Page 30: 15-441: Computer Networking

04/19/23 30

Layered Media Streams

S R

R1R2

R3

R10Mbps

10Mbps

512Kbps

128Kbps

10Mbps

R3 joins layer 1, fails at layer 2

R2 join layer 1,join layer 2 fails at layer 3

R1 joins layer 1,joins layer 2 joins layer 3

Page 31: 15-441: Computer Networking

04/19/23 31

Drop Policies for Layered Multicast

• Priority• Packets for low bandwidth layers are kept, drop

queued packets for higher layers• Requires router support

• Uniform (e.g., drop tail, RED)• Packets arriving at congested router are

dropped regardless of their layer

• Which is better?• Intuition vs. reality!

Page 32: 15-441: Computer Networking

04/19/23 32

RLM Intuition

• Uniform• Better incentives to well-behaved users• If oversend, performance rapidly degrades• Clearer congestion signal• Allows shared learning

• Priority• Can waste upstream resources• Hard to deploy

• RLM approaches optimal operating point• Uniform is already deployed

Page 33: 15-441: Computer Networking

04/19/23 33

RLM Intuition

Uniform vs. Priority Dropping

0

10

20

30

40

50

60

70

Offered load

Per

form

ance

Uniform

Priority

Page 34: 15-441: Computer Networking

04/19/23 34

Receiver-Driven Layered Multicast

• Each layer a separate group• Receiver subscribes to max group that will get

through with minimal drops

• Dynamically adapt to available capacity• Use packet losses as congestion signal

• Assume no special router support• Packets dropped independently of layer

Page 35: 15-441: Computer Networking

04/19/23 35

RLM Join Experiment

• Receivers periodically try subscribing to higher layer

• If enough capacity, no congestion, no drops Keep layer (& try next layer)

• If not enough capacity, congestion, drops Drop layer (& increase time to next retry)

• What about impact on other receivers?

Page 36: 15-441: Computer Networking

04/19/23 36

Join Experiments

1

2

3

4

Time

Layer

Page 37: 15-441: Computer Networking

04/19/23 37

Overview

• Multicast Challenges

• Content Distribution Networks

• Peer-to-Peer Networks

Page 38: 15-441: Computer Networking

04/19/23 38

Motivation

• Problem of traditional client-server model• Single point of failure (DoS Attack)• Not Scalable

• Solution• Replication (CDN)• Hosts connect to peers directly (P2P)

Page 39: 15-441: Computer Networking

04/19/23 39

Content Distribution Networks

• Replicate content on many servers• Challenges

• How to replicate content• Where to replicate content• How to find replicated content• How to choose among know replicas• How to direct clients towards replica

• Discussed in DNS/server selection lecture• DNS, HTTP 304 response, anycast, etc.

• Akamai

Page 40: 15-441: Computer Networking

04/19/23 40

How Akamai Works

• How is content replicated?

• Akamai only replicates static content

• Modified name contains original file

• Akamai server is asked for content• First checks local cache• If not in cache, requests file from primary server

and caches file

Page 41: 15-441: Computer Networking

04/19/23 41

How Akamai Works

• Clients fetch html document from primary server• E.g. fetch index.html from cnn.com

• URLs for replicated content are replaced in html• E.g. <img src=“http://cnn.com/af/x.gif”> replaced with

<img src=“http://a73.g.akamaitech.net/7/23/cnn.com/af/x.gif”>

• Client is forced to resolve aXYZ.g.akamaitech.net hostname

Page 42: 15-441: Computer Networking

04/19/23 42

How Akamai Works

• Root server gives NS record for akamai.net• Akamai.net name server returns NS record for

g.akamaitech.net• Name server chosen to be in region of client’s name

server• TTL is large

• G.akamaitech.net nameserver choses server in region

• Should try to chose server that has file in cache - How to choose?

• Uses aXYZ name and consistent hash• TTL is small

Page 43: 15-441: Computer Networking

04/19/23 43

How Akamai Works

End-user

cnn.com (content provider) DNS root server Akamai server

1 2 3

4

Akamai high-level DNS server

Akamai low-level DNS server

Closest Akamai server

11

67

8

9

10

Get index.html

Get /cnn.com/foo.jpg

12

Get foo.jpg

5

Page 44: 15-441: Computer Networking

04/19/23 44

Akamai – Subsequent Requests

End-user

cnn.com (content provider) DNS root server Akamai server

1 2 Akamai high-level DNS server

Akamai low-level DNS server

Closest Akamai server

7

8

9

10

Get index.html

Get /cnn.com/foo.jpg

Page 45: 15-441: Computer Networking

04/19/23 45

Consistent Hash

• “view” = subset of all hash buckets that are visible

• Desired features• Smoothness – little impact on hash bucket

contents when buckets are added/removed• Spread – small set of hash buckets that may

hold an object regardless of views • Load – across all views # of objects assigned to

hash bucket is small

Page 46: 15-441: Computer Networking

04/19/23 46

Consistent Hash – Example

• Monotone addition of bucket does not cause movement between existing buckets

• Spread & Load small set of buckets that lie near object

• Balance no bucket is responsible for large number of objects

• Construction• Assign each of C hash buckets to

random points on mod 2n circle, where, hash key size = n.

• Map object to random position on unit interval

• Hash of object = closest bucket

0

4

8

12Bucket

14

Page 47: 15-441: Computer Networking

04/19/23 47

Overview

• Multicast Challenges

• Content Distribution Networks

• Peer-to-Peer Networks

Page 48: 15-441: Computer Networking

04/19/23 48

Peer-to-peer networks

• Typically each member stores content that it desires

• Basically a replication system for files• Always the tradeoff between possible location

of files and searching difficulties• Peer-to-peer allows files to be anywhere

searching is the challenge

• Other challenges:• Dynamic member list• Scale

Page 49: 15-441: Computer Networking

04/19/23 49

Example: Napster

• Centralized Indexing• On startup, client contacts central server

and reports list of files• To download a file

• Client first contact centralized server to find the location of the file

• Transfer is done peer-to-peer

• Hybrid scheme• Advantage? Disadvantage?

Page 50: 15-441: Computer Networking

04/19/23 50

Example: Gnutella

• Distribute file location• Idea: multicast the request• Hot to find a file:

• Send request to all neighbors• Neighbors recursively multicast the request• Eventually a machine that has the file receives the request,

and it sends back the answer

• Advantages:• Totally decentralized, highly robust

• Disadvantages:• Not scalable; the entire network can be swamped with

request (to alleviate this problem, each request has a TTL)

Page 51: 15-441: Computer Networking

04/19/23 51

Example: Freenet

• Addition goals to file location:• Provide publisher anonymity, security • Resistant to attacks – a third party shouldn’t be able

to deny the access to a particular file (data item, object), even if it compromises a large fraction of machines

• Architecture:• Each file is identified by a unique identifier• Each machine stores a set of files, and maintains a

“routing table” to route the individual requests

Page 52: 15-441: Computer Networking

04/19/23 52

Freenet Query

• User requests key XYZ – not in local cache• Looks up nearest key in routing table and

forwards to corresponding node• If request reaches node with data, it

forwards data back to upstream requestor• Requestor adds file to cache, adds entry in

routing table• Any node forwarding reply may change the

source of the reply helps anonymity

• If data not found, failure is reported back

Page 53: 15-441: Computer Networking

04/19/23 53

Freenet Features

• Nodes tend to specialize in searching for similar keys over time

• LRU cache: Files are not guaranteed to live forever

• Files can be encrypted

• Messages have random 64 bit ID for loop detection

• Random initial TTL for strong anonymity

Page 54: 15-441: Computer Networking

04/19/23 54

Freenet Summary

• Advantages• Provides publisher anonymity• Totally decentralize architecture robust and

scalable• Resistant against malicious file deletion

• Disadvantages• Does not always guarantee that a file is found,

even if the file is in the network

Page 55: 15-441: Computer Networking

04/19/23 55

Conclusions

• The key challenge of building wide area P2P systems is a scalable and robust location service

• Solutions covered in this lecture• Naptser: centralized location service• Gnutella: broadcast-based decentralized location

service• Freenet: intelligent-routing decentralized solution (but

correctness not guaranteed; queries for existing items may fail)

• Other solutions: Chord, CAN