epidemic algorithms
TRANSCRIPT
![Page 2: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/2.jpg)
2
● Motivations Existing information dissemination protocols have scalability problems.
Randomized protocols may have a smaller overhead.
Tradeoff between reliability and scalability.
● Can be applied To largescale distributed systems (millions of nodes).
When realtime information dissemination is not required.
Introduction
![Page 3: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/3.jpg)
3
● Epidemics study the spread of a disease or infection in terms of populations of infected/uninfected individuals and their rates of change.
● How does it work?
Initially, a single individual is infective.
Individuals get in touch with each other, spreading the update.
● Our goal is to spread the infection (update) as fast and completely as possible!
Epidemic Protocols
![Page 4: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/4.jpg)
4
● Antientropy
● Rumor mongering
Two Styles of Epidemic Protocols
![Page 5: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/5.jpg)
5
● Each peer p periodically contacts a random partner q selected from the current population.
● Then, p and q engage in an information exchange protocol, where updates known to p but not to q are transferred from p to q (push), or viceversa (pull), or in both direction (pushpull).
Antientropy
![Page 6: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/6.jpg)
6
● Peers are initially ignorant.
● When an update is learned by a peer, it becomes a hot rumor.
● While a peer holds a hot rumor, it periodically chooses a random peer from the current population and sends (pushes) the rumor to it.
● Eventually, a node will lose interest in spreading the rumor.
Rumor Mongering
![Page 7: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/7.jpg)
7
● Counter vs. Coin
Counter: lose interest after k contacts.
Coin (random): lose interest with probability 1/k.
● Feedback vs. Blind
Feedback: lose interest only if the recipient knows the rumor.
Blind: lose interest regardless of the recipient.
Rumor Mongering: Loss of Interest
![Page 8: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/8.jpg)
8
● Participants’ load is independent of size
● Information spreads in log(system size) time.
% infe
cted
0.0
1.0
Time →
Epidemic Protocols Scale Very Nicely
![Page 9: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/9.jpg)
9
● Aggregation protocols
● Membership management (Cyclon)
● Topology management (Tman)
● Etc.
Use of Epidemic Protocols
![Page 10: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/10.jpg)
10
Aggregation Protocols
![Page 11: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/11.jpg)
11
● Aggregation is a common name for a set of functions that provide an estimate of some global system property.
● Aggregation functions enable local access to global information, in order to simplify the task of controlling, monitoring, and optimizing distributed applications.
● Some examples of aggregation functions:
The average load of nodes in a distributed storage system.
The sum of free space in a distributed storage system.
The total number of nodes in a P2P system.
Aggregation Protocols
![Page 12: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/12.jpg)
12
// timed event timer(T time units) q = SelectPeer() send S to q
// handle event recv Sp from p send S to p S = Update(S,Sp)
A Generic Aggregation Framework
// handle event recv Sq from q
S = Update(S,Sq)
![Page 13: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/13.jpg)
13
● Local state maintained by nodes: a real number representing the value to be averaged.
● selectPeer() performs a random selection among the set of current nodes.
● update(sp, sq) Avg: return (sp+sq)/2
Max: return max(sp,sq)
Some Comments
![Page 14: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/14.jpg)
14
164
36
8
102
Average Aggregation (1/5)
![Page 15: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/15.jpg)
15
164
36
8
102
Average Aggregation (2/5)
![Page 16: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/16.jpg)
16
164
36
8
66
(10 + 2) / 2 = 6
Average Aggregation (3/5)
![Page 17: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/17.jpg)
17
164
36
8
66
Average Aggregation (4/5)
![Page 18: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/18.jpg)
18
1010
36
8
66
(16 + 4) / 2 = 10
Average Aggregation (5/5)
![Page 19: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/19.jpg)
19
● If the graph is connected, each node converges to the average of the original values.
● After each exchange the variance is reduced.
Some Comments
![Page 20: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/20.jpg)
20
Illustration of Averaging
![Page 21: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/21.jpg)
21
● Any ideas?
Network Size Estimation
![Page 22: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/22.jpg)
22
● Any ideas?
● All nodes set their states to 0.
● The initiator sets its state to 1 and starts gossiping for the average.
● Eventually (after predefined k rounds) all nodes converge to the avg=1/N.
Network Size Estimation
![Page 23: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/23.jpg)
23
Membership Management
![Page 24: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/24.jpg)
24
● In a gossipbased protocol, each node in the system periodically exchanges information with a subset of peers.
● The choice of this subset is crucial.
● Ideally, the peers should be selected following a uniform random sample of all nodes currently in the system.
Membership Management
![Page 25: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/25.jpg)
25
● Each node may be assumed to know every other node in the system.
● However, providing each node with a complete membership table from which a random sample can be drawn, is unrealistic in a largescale dynamic system.
Achieving a Uniform Random Sample
![Page 26: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/26.jpg)
26
● Peer sampling
● Every node maintains a relatively small local membership table that provides a partial view on the complete set of nodes.
● Periodically refreshes the table using a gossiping procedure.
An Alternative Solution
![Page 27: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/27.jpg)
27
// timed event every T time unitshandle q = view.SelectPeer() buf = ((myAddress, 0)) view.permute() move oldest H items to the end of view buf.append(view.head(c/2-1)) send buf to q recv bufq from q view.select(c, H, S, bufq) view.increaseAge()
Peer Sampling Generic Framework (1/3)
![Page 28: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/28.jpg)
28
// receiver handler handle recv bufp from p buf = ((myAddress, 0)) view.permute() move oldest H items to the end of view buf.append(view.head(c/2-1)) send buf to p view.select(c, H, S, bufp) view.increaseAge()
Peer Sampling Generic Framework (2/3)
![Page 29: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/29.jpg)
29
// view select methodmethod view.select(c, H, S, bufp) view.append(bufp) view.removeDuplicates() view.removeOldItems(min(H, view.size-c)) view.removeHead(min(S, view.size-c)) view.removeAtRandom(view.size-c)
Peer Sampling Generic Framework (3/3)
![Page 30: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/30.jpg)
30
● Peer Selection Rand: uniform random
Tail: highest age
● View Propagation Push
PushPull
● View Selection Blind: H = 0, S = 0
Healer: H = c / 2
Swapper: H = 0, S = c / 2
Design Space
Peer Selection
View Propagation
View Selection
Rand
Tail
Push Push-Pull
Blind
Heale
r
Swappe
r
![Page 31: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/31.jpg)
31
Gossipbased Peer Sampling Protocol (1/7)
n1n2
n3
n4n5
n6n7
n8
n9
n10
n11
![Page 32: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/32.jpg)
32
Gossipbased Peer Sampling Protocol (2/7)
n1n2
n3
n4n5
n6n7
n8
n9
n10
n11
n8n7n10n5
n1n6n3n11
![Page 33: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/33.jpg)
33
Gossipbased Peer Sampling Protocol (3/7)
n1n2
n3
n4n5
n6n7
n8
n9
n10
n11
n8n7n10n5
n1n6n3n11
shuffle request
n8n7
![Page 34: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/34.jpg)
34
Gossipbased Peer Sampling Protocol (4/7)
n1n2
n3
n4n5
n6n7
n8
n9
n10
n11
n8n7n10n5
n1n6n3n11
shuffle response
n1n6
n8n7
![Page 35: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/35.jpg)
35
Gossipbased Peer Sampling Protocol (5/7)
n1n2
n3
n4n5
n6n7
n8
n9
n10
n11
n8n7n10n5
n1n6n3n11
n1n6
n8n7
![Page 36: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/36.jpg)
36
Gossipbased Peer Sampling Protocol (6/7)
n1n2
n3
n4n5
n6n7
n8
n9
n10
n11
n8n7n10n5
n1n3n6n11
n1n6
n8n7
UpdateState
UpdateState
![Page 37: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/37.jpg)
37
Gossipbased Peer Sampling Protocol (7/7)
n1n2
n3
n4n5
n6n7
n8
n9
n10
n11
n8n7n10n5
n1n3n3n11
n1n6
n8n7
![Page 38: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/38.jpg)
38
● Peer Selection Rand: uniform random
Tail: highest age
● View Propagation Push
PushPull
● View Selection Blind: H = 0, S = 0
Healer: H = c / 2
Swapper: H = 0, S = c / 2
Newscast as a Peer Sampling Example
Peer Selection
View Propagation
View Selection
Rand
Tail
Push Push-Pull
Blind
Heale
r
Swappe
r
![Page 39: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/39.jpg)
39
Newscast (1/7)
n1
n3
n5
n6n7
n10
n11Id, timen7, 9n10, 16n5, 12
Id, timen1, 7n3, 14n6, 10
![Page 40: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/40.jpg)
40
Newscast (2/7)
n1
n3
n5
n6n7
n10
n11Id, timen7, 9n10, 16n5, 12
● Pick a random peer from my view
Id, timen1, 7n3, 14n6, 10
![Page 41: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/41.jpg)
41
Newscast (3/7)
n1
n3
n5
n6n7
n10
n11Id, timen7, 9n10, 16n5, 12
● Pick a random peer from my view
● Send each other view + own fresh link
Id, timen1, 7n3, 14n6, 10
Id, timen7, 9n10, 16n5, 12
Id, timen11, 20
![Page 42: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/42.jpg)
42
Newscast (4/7)
n1
n3
n5
n6n7
n10
n11Id, timen7, 9n10, 16n5, 12
● Pick a random peer from my view
● Send each other view + own fresh link
Id, timen1, 7n3, 14n6, 10
Id, timen7, 9n10, 16n5, 12
Id, timen1, 7n3, 14n6, 10
Id, timen11, 20
Id, timen5, 20
![Page 43: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/43.jpg)
43
Newscast (5/7)
n1
n3
n5
n6n7
n10
n11Id, timen7, 9n10, 16n5, 12
● Pick a random peer from my view
● Send each other view + own fresh link
● Keep c freshest links (remove own info and duplicates)
Id, timen1, 7n3, 14n6, 10
Id, timen7, 9n10, 16n5, 12
Id, timen1, 7n3, 14n6, 10
Id, timen11, 20
Id, timen5, 20
![Page 44: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/44.jpg)
44
Newscast (6/7)
n1
n3
n5
n6n7
n10
n11Id, timen7, 9n10, 16n5, 12
● Pick a random peer from my view
● Send each other view + own fresh link
● Keep c freshest links (remove own info and duplicates)
Id, timen1, 7n3, 14n6, 10
Id, timen7, 9n10, 16n5, 12
Id, timen1, 7n3, 14n6, 10
Id, timen11, 20
Id, timen5, 20
![Page 45: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/45.jpg)
45
Newscast (7/7)
n1
n3
n5
n6n7
n10
n11Id, timen3, 14n10, 16n5, 20
● Pick a random peer from my view
● Send each other view + own fresh link
● Keep c freshest links (remove own info and duplicates)
Id, timen3, 14n10, 16n11, 20
![Page 46: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/46.jpg)
46
● Peer Selection Rand: uniform random
Tail: highest age
● View Propagation Push
PushPull
● View Selection Blind: H = 0, S = 0
Healer: H = c / 2
Swapper: H = 0, S = c / 2
Cyclon as a Peer Sampling Example
Peer Selection
View Propagation
View Selection
Rand
Tail
Push Push-Pull
Blind
Heale
r
Swappe
r
![Page 47: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/47.jpg)
47
Cyclon (1/5)
n1
n3
n5
n6n7
n10
n11Id, timen7, 9n10, 16n5, 4
Id, timen1, 7n3, 14n6, 10
![Page 48: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/48.jpg)
48
Cyclon (2/5)
n1
n3
n5
n6n7
n10
n11Id, timen7, 9n10, 16n5, 4
Id, timen1, 7n3, 14n6, 10
● Pick the oldest peer from my view and remove it from the view.
![Page 49: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/49.jpg)
49
Cyclon (3/5)
n1
n3
n5
n6n7
n10
n11Id, timen7, 9n10, 16 Id, time
n1, 7n3, 14n6, 10
● Pick the oldest peer from my view and remove it from the view.
● Exchange some of the peers in neighbours (swap policy)
● The active peer sends its fresh address
Id, timen10, 9n11, 20
![Page 50: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/50.jpg)
50
Cyclon (4/5)
n1
n3
n5
n6n7
n10
n11Id, timen7, 9n10, 16 Id, time
n1, 7n3, 14n6, 10
● Pick the oldest peer from my view and remove it from the view.
● Exchange some of the peers in neighbours (swap policy).
● The active peer sends its fresh address
Id, timen10, 9n11, 20
Id, timen3, 14n6, 10
![Page 51: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/51.jpg)
51
Cyclon (5/5)
n1
n3
n5
n6n7
n10
n11Id, timen7, 9n3, 14n6, 10
Id, timen1, 7n10, 9n11, 20
● Pick the oldest peer from my view and remove it from the view.
● Exchange some of the peers in neighbours (swap policy).
● The active peer sends its fresh address
![Page 52: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/52.jpg)
52
Cyclon Properties: Connectivity
● In a failfree environment, no peer becomes disconnected in the undirected graph.
● Pointers move, so peers change from being neighbor of one peer to being the neighbor of another peer
![Page 53: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/53.jpg)
53
Cyclon Properties: Convergence
● Starting from a state, where peers are connected in a chain.
● Convergence is defined by having the same average path length as a random graph.
![Page 54: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/54.jpg)
54
Cyclon Properties: Clustering Coefficient
● Clustering Coefficient (of a node): the ratio of existing links among the node’s neighbors over the total number of possible links among them.
● Shows what percentage the neighbors of a node are also neighbors among themselves.
![Page 55: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/55.jpg)
55
Cyclon Properties: lndegree Distribution
![Page 56: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/56.jpg)
56
Topology Management
![Page 57: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/57.jpg)
57
TMan
● Tman is a protocol that can construct and maintain any topology with the help of a ranking function.
● The ranking function orders any set of nodes according to their desirability to be neighbors of a given node
![Page 58: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/58.jpg)
58
// timed event every T time unitshandle q = view.selectPeer() myDescriptor = (myAddress, myProfile) buf = merge(view, myDescriptor) buf = merge(buf, rnd.view) send buf to q recv bufq from q
buf = merge(bufq,view) view = selectView(buf)
A Generic TMan Framework (1/2)
![Page 59: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/59.jpg)
59
// receiver handlerHandle
recv bufp from p myDescriptor = (myAddress, myProfile) buf = merge(view, myDescriptor) buf = merge(buf, rnd.view) send buf to p buf = merge(bufp,view) view = selectView(buf)
A Generic TMan Framework (2/2)
![Page 60: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/60.jpg)
60
Some Comments
● SelectPeer Sort all nodes in the view based on ranking. Pick randomly one node from the first half.
● rnd.view provides a random sample of the nodes from the entire network, e.g.,
using cyclon
● SelectView Sort all nodes in buffer (about double size of the view) Pick out c highest ranked nodes.
![Page 61: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/61.jpg)
61
Ranking Function
● Sample ranking functions: Line: d(a, b) = |a – b| Ring: d(a, b) = min(N |a – b|, |a – b|)
![Page 62: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/62.jpg)
62
Illustration of TMan
![Page 63: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/63.jpg)
63
Connectivity Problemson the Open Internet
![Page 64: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/64.jpg)
64
NAT Environments (1/4)
n1
n2n3
n4
n5
n6
n7
n8
n9
n10
n11
Private node
Public node
shuffle request
![Page 65: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/65.jpg)
65
NAT Environments (1/4)
n1
n2n3
n4
n5
n6
n7
n8
n9
n10
n11
Private node
Public node
shuffle response
![Page 66: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/66.jpg)
66
NAT Environments (1/4)
n1
n2n3
n4
n5
n6
n7
n8
n9
n10
n11
Private node
Public node
shuffle response
UpdateState
UpdateState
![Page 67: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/67.jpg)
67
NAT Environments (1/4)
n1
n2n3
n4
n5
n6
n7
n8
n9
n10
n11
Private node
Public node
shuffle request
![Page 68: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/68.jpg)
68
Solutions for Communicating with Private Nodes (1/2)
● Relay communications to the private node using a public relay node.
![Page 69: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/69.jpg)
69
Solutions for Communicating with Private Nodes (2/2)
● Use a NAT holepunching algorithm to establish a direct connection to the private node using a public rendezvous node.
![Page 70: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/70.jpg)
70
Relaying or Hole Punching?
● Relaying?
Lower latency message exchange.
• Enables lower gossip cycle periods.
• Necessary in dynamic networks
● Hole punching?
Decreases load on public nodes.
• But not if shuffle messages are small.
![Page 71: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/71.jpg)
71
Gozar as a NATaware Peer Sampling Example
● In Gozar, each private node connects to one or more public nodes, called partners that act as a relay or rendezvous server on behalf of the private node.
● A node's descriptor consists of both its own address, its NAT type, and its partners' addresses at the time of descriptor creation.
● When a node wants to gossip with a private node, it uses the partner addresses in its descriptor to communicate with the private node.
![Page 72: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/72.jpg)
72
Partnering (1/10)
Bootstrap servern1n1
n2
n3
n4
n5
...
...
...
...
![Page 73: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/73.jpg)
73
Partnering (2/10)
Bootstrap servern1n1
n2
n3
n4
n5
...
...
...
...
![Page 74: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/74.jpg)
74
Partnering (3/10)
Bootstrap servern1n1
n2
n3
n4
n5n1, public, nulln4, public, null...
...
...
...
...
![Page 75: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/75.jpg)
75
Partnering (4/10)
Bootstrap servern1n1
n2
n3
n4
n5n1, public, nulln4, public, null...
request
request
...
...
...
...
![Page 76: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/76.jpg)
76
Partnering (5/10)
Bootstrap servern1n1
n2
n3
n4
n5n1, public, nulln4, public, null...
ACK
NACK
...
...
...
...
![Page 77: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/77.jpg)
77
Partnering (6/10)
Bootstrap servern1n1
n2
n3
n4
n5n1, public, nulln4, public, null...
...
...
...
...
![Page 78: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/78.jpg)
78
Partnering (7/10)
Bootstrap servern1n1
n2
n3
n4
n5n1, public, nulln4, public, null...
Shuffle exchange
n2, private, n1...
...
...
...
![Page 79: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/79.jpg)
79
Partnering (8/10)
Bootstrap servern1n1
n2
n3
n4
n5n1, public, nulln4, public, null...
Shuffle exchange
n2, private, n1...
n2, private, n1...
...
...
![Page 80: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/80.jpg)
80
Partnering (9/10)
Bootstrap servern1n1
n2
n3
n4
n5n1, public, nulln4, public, null...
Shuffle request
n2, private, n1...
n2, private, n1...
...
...
![Page 81: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/81.jpg)
81
Partnering (10/10)
Bootstrap servern1n1
n2
n3
n4
n5n1, public, nulln4, public, null...
Shuffle response
n2, private, n1...
n2, private, n1...
...
...
![Page 82: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/82.jpg)
82
Summary
![Page 83: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/83.jpg)
83
Summary
● Epidemics algorithms are important technique to solve problems in dynamic large scale systems
Scalable
Simple
Robust to node failures, message loss and transient network disruptions (network partitions … )
● Applications:
Aggregation
Membership management
Topology management
![Page 84: Epidemic Algorithms](https://reader031.vdocuments.us/reader031/viewer/2022012409/616a446f11a7b741a350a46f/html5/thumbnails/84.jpg)
84
Question
AcknowledgementSome slides were derived from the slides of Alberto Montresor and Seif Haridi