Gossip Peer Sampling in Real World Amir H. Payberah (amir@sics.se) - - PowerPoint PPT Presentation

gossip peer sampling in real world
SMART_READER_LITE
LIVE PREVIEW

Gossip Peer Sampling in Real World Amir H. Payberah (amir@sics.se) - - PowerPoint PPT Presentation

Gossip Peer Sampling in Real World Amir H. Payberah (amir@sics.se) Amir H. Payberah 22 June 2010 1/55 Gossip Peer Sampling Amir H. Payberah 22 June 2010 2/55 Peer Sampling Service The peer sampling service provides each node with


slide-1
SLIDE 1

1/55

Amir H. Payberah – 22 June 2010

Gossip Peer Sampling in Real World

Amir H. Payberah (amir@sics.se)

slide-2
SLIDE 2

2/55

Amir H. Payberah – 22 June 2010

Gossip Peer Sampling

slide-3
SLIDE 3

3/55

Amir H. Payberah – 22 June 2010

Peer Sampling Service

  • The peer sampling service provides each node with a list of nodes in

the system.

  • We would like that nodes are selected following a uniform random

sample of all nodes in the system.

slide-4
SLIDE 4

4/55

Amir H. Payberah – 22 June 2010

Gossip Peer Sampling Service

  • One solution to achieve the uniform random selection is that every

node knows all other nodes of the system.

  • Not scalable
  • Use a gossip-based dissemination of membership information to

build an unstructured overlay.

  • There are many variants of the basic gossip-based membership

dissemination idea, but it is not clear whether any of these variants actually lead to uniform sampling.

slide-5
SLIDE 5

5/55

Amir H. Payberah – 22 June 2010

Generic Framework

  • First, a node Q is selected to exchange membership information with by

node P.

  • Node P pushes its view to Q.
  • If a reply is expected, the view is pulled from Q.
  • They merge their current view and the received one, and select a new

view.

slide-6
SLIDE 6

6/55

Amir H. Payberah – 22 June 2010

Gossip Protocol (1/4)

slide-7
SLIDE 7

7/55

Amir H. Payberah – 22 June 2010

Gossip Protocol (2/4)

gossip

slide-8
SLIDE 8

8/55

Amir H. Payberah – 22 June 2010

Gossip Protocol (3/4)

reply

slide-9
SLIDE 9

9/55

Amir H. Payberah – 22 June 2010

Gossip Protocol (4/4)

Update State Update State

slide-10
SLIDE 10

10/55

Amir H. Payberah – 22 June 2010

Design Space

  • Peer Selection
  • Rand
  • Tail
  • View Propagation
  • Push
  • Push-Pull
  • View Selection
  • Blind
  • Healer
  • Swapper
slide-11
SLIDE 11

11/55

Amir H. Payberah – 22 June 2010

Impact of NAT on Gossip Peer Sampling Protocols

slide-12
SLIDE 12

12/55

Amir H. Payberah – 22 June 2010

Natted Gossip Protocol (1/4)

gossip

slide-13
SLIDE 13

13/55

Amir H. Payberah – 22 June 2010

Natted Gossip Protocol (2/4)

reply

slide-14
SLIDE 14

14/55

Amir H. Payberah – 22 June 2010

Natted Gossip Protocol (3/4)

Update State Update State

slide-15
SLIDE 15

15/55

Amir H. Payberah – 22 June 2010

Natted Gossip Protocol (4/4)

gossip

slide-16
SLIDE 16

16/55

Amir H. Payberah – 22 June 2010

Network Partition

View size: 15 View size: 27

slide-17
SLIDE 17

17/55

Amir H. Payberah – 22 June 2010

Stale References

slide-18
SLIDE 18

18/55

Amir H. Payberah – 22 June 2010

Randomness

slide-19
SLIDE 19

19/55

Amir H. Payberah – 22 June 2010

Classic NAT Types

  • Full Cone (FC): The most permissive type of NAT.
  • Restricted Cone (RC): Imposes restrictions on the IP addresses of external

peers that can send messages to natted peers.

  • Port Restricted Cone (PRC): Imposes restrictions on the IP addresses and

ports of external peers that can send messages to natted peers.

  • Symmetric (SYM): The most restrictive type of NAT.
slide-20
SLIDE 20

20/55

Amir H. Payberah – 22 June 2010

NAT Types

  • NATs differ in:
  • Way they assign public IP addresses (IP)
  • Way assign ports (Port)
  • Filtering rules (Filtering)
slide-21
SLIDE 21

21/55

Amir H. Payberah – 22 June 2010

Classic NAT Types – FC

  • IP: Same public IP to all sessions started from a given natted IP

address and port.

  • Port: Same port to all sessions started from a given natted IP

address and port.

  • Filtering: These sessions all share the same filtering rule, which

states that the NAT must forward all incoming messages.

slide-22
SLIDE 22

22/55

Amir H. Payberah – 22 June 2010

Classic NAT Types – RC

  • IP: The same as FC.
  • Port: The same as FC.
  • Filtering: The sessions started from a given natted peer’s IP address

and port towards a target IP address, share the same filtering rule: the NAT device only forwards messages coming from this IP address.

slide-23
SLIDE 23

23/55

Amir H. Payberah – 22 June 2010

Classic NAT Types – PRC

  • IP: The same as FC.
  • Port: The same as FC.
  • Filtering: The sessions started from a given natted peer’s IP address

and port towards a target IP address and port, share the same filtering rule: the NAT device only forwards messages coming from this IP address and port.

slide-24
SLIDE 24

24/55

Amir H. Payberah – 22 June 2010

Classic NAT Types – Symmetric

  • IP: The same as FC.
  • Port: Different port for each session started from a given natted IP

address and port.

  • Filtering: The same as PRC.
slide-25
SLIDE 25

25/55

Amir H. Payberah – 22 June 2010

NATCracker Perspective

  • Mapping policy: Decides when to bind a new port.
  • Endpoint Independent (EI)
  • Host Dependent (HD)
  • Port Dependent (PD)
  • Allocation policy: Decides which port should be bound.
  • Port Preservation (PP)
  • Port Contiguity (PC)
  • Random (RD)
  • Filtering policy: Decides whether a packet from the outside world to a public

endpoint of a NAT gateway should be forwarded to the corresponding private endpoint.

  • Endpoint Independent (EI)
  • Host Dependent (HD)
  • Port Dependent (PD)
slide-26
SLIDE 26

26/55

Amir H. Payberah – 22 June 2010

NAT Traversal Techniques

  • Hole punching (UDP)
  • Relaying
  • When the destination node is behind a SYM NAT and the source node is either behind

a PRC NAT or a SYM NAT.

  • When the destination node is behind a PRC NAT and the source node is behind a

SYM NAT.

slide-27
SLIDE 27

27/55

Amir H. Payberah – 22 June 2010

NAT Traversal Techniques – Hole Punching (UDP)

slide-28
SLIDE 28

28/55

Amir H. Payberah – 22 June 2010

NAT Traversal Techniques – Relaying

slide-29
SLIDE 29

29/55

Amir H. Payberah – 22 June 2010

Three Proposed Solutions

slide-30
SLIDE 30

30/55

Amir H. Payberah – 22 June 2010

ARRG: Real-World Gossiping

Niels Drost, Elth Ogston, Rob V. van Nieuwpoort and Henri E. Bal Vrije Universiteit Amsterdam (HPDC'07)

slide-31
SLIDE 31

31/55

Amir H. Payberah – 22 June 2010

Design Space

  • Peer Selection
  • Rand
  • Blind
  • View Propagation
  • Push
  • Push-Pull
  • View Selection
  • Blind
  • Healer
  • Swapper
slide-32
SLIDE 32

32/55

Amir H. Payberah – 22 June 2010

The ARRG Protocol

  • Actualized Robust Random Gossiping (ARRG).
  • It uses Fallback Cache to solve the network connectivity problem.
  • The Fallback Cache acts as a backup for the normal membership

cache present in the gossiping algorithm.

  • Each time a successful gossip exchange is done, the target of this

gossip is added to the Fallback Cache.

  • Whenever a gossip attempt fails, the Fallback Cache is used to

select an entry to gossip with instead of the one selected by the

  • riginal algorithm.
slide-33
SLIDE 33

33/55

Amir H. Payberah – 22 June 2010

Example (1/4)

n1 n2 n3 n4

Fallback Cache gossip

slide-34
SLIDE 34

34/55

Amir H. Payberah – 22 June 2010

Example (2/4)

n1 n2 n3 n4

Fallback Cache reply

n2

slide-35
SLIDE 35

35/55

Amir H. Payberah – 22 June 2010

Example (3/4)

n1 n2 n3 n4

Fallback Cache

n2

gossip

slide-36
SLIDE 36

36/55

Amir H. Payberah – 22 June 2010

Example (4/4)

n1 n2 n3 n4

Fallback Cache

n2

gossip

slide-37
SLIDE 37

37/55

Amir H. Payberah – 22 June 2010

NAT-resilient Gossip Peer Sampling

Anne-Marie Kermarrec, Alessio Pace, Vivien Quema, Valerio Schiavoni INRIA - CNRS (ICDCS'09)

slide-38
SLIDE 38

38/55

Amir H. Payberah – 22 June 2010

Design Space

  • Peer Selection
  • Rand
  • Blind
  • View Propagation
  • Push
  • Push-Pull
  • View Selection
  • Blind
  • Healer
  • Swapper
slide-39
SLIDE 39

39/55

Amir H. Payberah – 22 June 2010

The Nylon Protocol

  • The main idea of Nylon is to implement reactive hole punching.
  • A peer only performs hole punching towards peers it gossip with.
  • Hole punching is implemented using a chain of RVPs that forward

the OPEN HOLE message until it reaches the gossip target.

slide-40
SLIDE 40

40/55

Amir H. Payberah – 22 June 2010

The Nylon Protocol

  • Each node maintains a routing table that maintains the mapping

between a natted node from its view and its associated RVP.

  • For each node P in the routing table, the RVP is the node it shuffled

with to obtain the reference to P.

  • RVPs do not proactively refresh holes.
  • Therefore, a time to live (TTL) is associated to each RVP entries in

routing tables.

slide-41
SLIDE 41

41/55

Amir H. Payberah – 22 June 2010

Example (1/3)

n1 n2

rule TTL n2: allow 120 Others: deny dest RVP TTL n2

  • 120

rule TTL n1: allow 120 Others: deny dest RVP TTL n1

  • 120

Hole punching n1 and n2 become RVP for each other. Routing table

slide-42
SLIDE 42

42/55

Amir H. Payberah – 22 June 2010

Example (2/3)

n1 n2

rule TTL n2: allow 120 Others: deny dest RVP TTL n2

  • 120

rule TTL n2: allow 120 dest RVP TTL n2 120 n2 and n3 become RVP for each other.

n3 n2

rule TTL n2: allow 120 Others: deny dest RVP TTL n2 120

n2

rule TTL 120 Others: deny dest RVP TTL n2 120

n2

rule TTL n2: allow 120 Others: deny dest RVP TTL n2 120

n2

rule TTL n1: allow 120 Others: deny dest RVP TTL n2 120

n2

rule TTL n1: allow 120 n3: allow 140 Others: deny dest RVP TTL n1

  • 120

n3

  • 120

Hole punching rule TTL n2: allow 120 dest RVP TTL n2 120 rule TTL n2: allow 120 Others: deny dest RVP TTL n2 120 rule TTL 120 Others: deny dest RVP TTL n2 120 rule TTL n2: allow 120 Others: deny dest RVP TTL n2 120 rule TTL n1: allow 120 Others: deny dest RVP TTL n2 120 rule TTL n1: allow 120 n3: allow 140 Others: deny dest RVP TTL n1 n2 120 n2

  • 120
slide-43
SLIDE 43

43/55

Amir H. Payberah – 22 June 2010

Example (3/3)

n1 n2

rule TTL n2: allow 120 Others: deny dest RVP TTL n2

  • 120

rule TTL n2: allow 120 dest RVP TTL n2 120 Through this chain n3 can shuffle with n1. n3 performs hole punching toward n1 by sending an OPEN_HOLE message to n2 that will forward it to n1.

n3 n2

rule TTL n2: allow 120 Others: deny dest RVP TTL n2 120

n2

rule TTL 120 Others: deny dest RVP TTL n2 120

n2

rule TTL n2: allow 120 Others: deny dest RVP TTL n2 120

n2

rule TTL n1: allow 120 Others: deny dest RVP TTL n2 120

n2

rule TTL n1: allow 120 n3: allow 140 Others: deny dest RVP TTL n1

  • 120

n3

  • 120

OPEN_HOLE rule TTL n2: allow 120 dest RVP TTL n2 120 rule TTL n2: allow 120 Others: deny dest RVP TTL n2 120 rule TTL 120 Others: deny dest RVP TTL n2 120 rule TTL n2: allow 120 Others: deny dest RVP TTL n2 120 rule TTL n1: allow 120 Others: deny dest RVP TTL n2 120 rule TTL n1: allow 120 n3: allow 140 Others: deny dest RVP TTL n1 n2 120 n2

  • 120

OPEN_HOLE

slide-44
SLIDE 44

44/55

Amir H. Payberah – 22 June 2010

Balancing Gossip Exchanges in Networks with Firewalls

Joao Leitao, Robbert van Renesse, Luıs Rodrigues INESC-ID/IST - Cornell University (IPTPS'10)

slide-45
SLIDE 45

45/55

Amir H. Payberah – 22 June 2010

Design Space

  • Peer Selection
  • Rand
  • Blind
  • View Propagation
  • Push
  • Push-Pull
  • View Selection
  • Blind
  • Healer
  • Swapper
  • ?
slide-46
SLIDE 46

46/55

Amir H. Payberah – 22 June 2010

The Protocol

  • Each node maintains:
  • A quota value (initially with a value of 1).
  • Nodes increase their quota when they initiate a gossip exchange.
  • A single-entry cache for connections created by other nodes.
  • The connection cache keeps alive the last connection used by another peer to initiate a

gossip exchange.

  • When a node receives a gossip request, engages in gossip exchange

if:

  • Has a quota value above zero.
  • Has an empty connection cache.
  • The gossip message has been already forwarded TTL times.
slide-47
SLIDE 47

47/55

Amir H. Payberah – 22 June 2010

Example (1/8)

1 1 1 n1 n2 n3

slide-48
SLIDE 48

48/55

Amir H. Payberah – 22 June 2010

Example (2/8)

2 1 1 n1 n2 n3 gossip

slide-49
SLIDE 49

49/55

Amir H. Payberah – 22 June 2010

Example (3/8)

2 1 n1 n2 n3 reply n1

slide-50
SLIDE 50

50/55

Amir H. Payberah – 22 June 2010

Example (4/8)

2 2 n1 n2 n3 n1 gossip

slide-51
SLIDE 51

51/55

Amir H. Payberah – 22 June 2010

Example (5/8)

2 2 n1 n2 n3 n1 gossip gossip

slide-52
SLIDE 52

52/55

Amir H. Payberah – 22 June 2010

Example (6/8)

2 2 n1 n2 n3 n3 gossip gossip

slide-53
SLIDE 53

53/55

Amir H. Payberah – 22 June 2010

Example (7/8)

1 2 n1 n2 n3 n3 reply

slide-54
SLIDE 54

54/55

Amir H. Payberah – 22 June 2010

Example (8/8)

1 2 n1 n2 n3 n3 reply reply

slide-55
SLIDE 55

55/55

Amir H. Payberah – 22 June 2010

Question?