Probabilistic Broadcast Presented by Keren Censor 1.
-
Upload
dominick-mason -
Category
Documents
-
view
220 -
download
1
Transcript of Probabilistic Broadcast Presented by Keren Censor 1.
![Page 1: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/1.jpg)
Probabilistic BroadcastPresented by Keren Censor
1
![Page 2: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/2.jpg)
Traditional client-server model Central point of failure Performance bottleneck Heavy load on servers
2
![Page 3: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/3.jpg)
Peer-to-Peer (P2P) Central point of failure Performance bottleneck Heavy load on servers
3
![Page 4: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/4.jpg)
Information Dissemination Deterministic solutions
Flooding – send a message to every neighbor #Messages = O(#edges) Time = diameter
Deterministic routing – send according to a spanning tree Non-resilient to failures Time = O(#nodes)
4
![Page 5: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/5.jpg)
Requirements Reliable broadcast
Reach all nodes Resilient to failures
Considering: Dynamic network topology Crashes Disconnections Packet losses
5
![Page 6: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/6.jpg)
Random information spreading Trade reliability with scalability
Algorithm may be less reliable, but should scale well with system size
Basic gossip algorithm Forward information to a randomly chosen subset
of your neighbors. Design parameters: Buffer capacity B Fan-out F Number of times a message is forwarded T
6
![Page 7: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/7.jpg)
Previous algorithms First developed for consistency management
of replicated database [Demers et al. 1987]
Reliability in Bimodal Multicast [Birman et al. 1999]:
The set of nodes that a message reaches is Almost all of the nodes, with high probability Almost none of the nodes, with small probability Other subsets, with vanishingly small probability
7
![Page 8: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/8.jpg)
Design constraints Membership
Knowledge of the participants Network awareness
Knowledge of real network topology Buffer management
Memory usage Message filtering
According to different interests
8
![Page 9: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/9.jpg)
Design constraints Membership
Knowledge of the participants in the system Previous algorithms assume this knowledge Problems:
Storage increases linearly with system size n Maintenance imposes extra load
9
![Page 10: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/10.jpg)
Design constraints Membership
Solution: integrate membership with gossip and maintain partial view Uniformity: how to gossip to members chosen
uniformly at random from the entire system Adaptivity: some parameter must grow with system
size, how do we estimate the system size? Bootstraping: how is the system initialized?
10
![Page 11: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/11.jpg)
Design constraints Network awareness
Knowledge of real network topology Problem: a message sent by p to a nearby q may be
routed through a remote w
p wq
11
![Page 12: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/12.jpg)
Network awareness Solution: organize processes in a hierarchy that
reflects the network topology Distributed? Fault tolerant? Scalable?
Design constraints
12
![Page 13: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/13.jpg)
Related approaches
Directional gossip [Lin and Marzullo, 1999]: a weight is given for each neighbor, according to its connectivity. A higher probability is given for neighbors with less weight
11Pr nBlue
Pr Green
in each round
grows with each round
13
![Page 14: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/14.jpg)
Design constraints Buffer management
Memory usage Problem: limited buffers. When buffer is full:
Drop new messages? Drop old messages?
In Bimodal Multicast: a message is gossiped by a node for a limited number of rounds, and then it is erased
14
![Page 15: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/15.jpg)
Design constraints Buffer management
Solutions: Age-based priorities Application semantics
Elaboration later
15
![Page 16: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/16.jpg)
Message filtering According to different interests Problem: redundancy if there are topics of interest
How does a process know the interest of its neighbors? Assume magically that this info is available, does p
decide not to send to q a message it is not interested in?
Solution: hierarchy of processes
Design constraints
p wq
What if w is interested?
16
![Page 17: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/17.jpg)
LPBCAST Lightweight Probabilistic Broadcast
[Eugster, Guerraoui, Handurukande, Kouznetsov, and Kermarrec, 2003]
Main contribution: Scalable memory consumption for
Membership management Message buffering
17
![Page 18: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/18.jpg)
Model Set of processes П = {p1 , p2 , …} Synchronous rounds Complete logical network
LPBCAST has partial views
Application Application
LPBCASTLPBCAST
18
![Page 19: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/19.jpg)
Buffers Event notifications – events Event notifications identifiers – eventIds Unsubscriptions – unSubs Subscriptions – subs and view
Each buffer L has a maximum size |L|max
Truncation of L: removing random elements so that |L|≤|L|max
view
eventIds
unSubs
subs
events
19
![Page 20: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/20.jpg)
Receiving event from application Upon LPCAST(e)
Add e to events
e
eventsApplication
LPBCASTe
20
![Page 21: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/21.jpg)
Gossiping Periodically (gossip period T ms) generate a
message and send to F (fanout) members chosen randomly from view
view
F random elements
Gossipmessage
eventIds
unSubs
subs
events = Ø
∪{pi}
21
![Page 22: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/22.jpg)
Gossip reception Unsubscriptions:
Remove from view and subs Add to unSubs and truncate
view unSubssubs
pi pipi
pj pjpj
unSubsunSubs
random elements
22
![Page 23: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/23.jpg)
Gossip reception Subscriptions:
Add to view and subs Truncate view into subs Truncate subs
view subs
pipi
pjpj
viewview subssubssubs
random elementsrandom elements
23
![Page 24: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/24.jpg)
Gossip reception Events:
Deliver new event notifications to application Add to eventIds and events, and truncate If received id not in eventIds then add to
retrieveBuf
eeventIdsevents
Application
LPBCAST e e.id
retrieveBuf
id
Keeps ids of all delivered events
24
![Page 25: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/25.jpg)
Retrieving events If > k rounds passed since an eventId was
inserted into retrieveBuf, and the matching event was not yet received: Ask for the event from the process q from whom
eventId was received. If no reply for r rounds: Ask for the event from a random neighbor. Ask for the event from the source of the event.
25
![Page 26: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/26.jpg)
Subscriptions and unsubscriptions Subscribe: pi subscribes by some known pj , which
gossips this subscription. Gossip messages will start reaching pi , otherwise it subscribes again
Unsubscribe: have timestamps after which unsubscriptions become obsolete
Subscriptions are gossiped continuously to insure uniformly distributed views: a failed process will be removed from all views with high probability
26
![Page 27: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/27.jpg)
Analysis – Assumptions n processes, П is constant Latency is smaller than gossip period T Failures are stochastically independent:
Probability of a message lost ≤ ε Number of crashes ≤ f
Event notification identifiers are unique Pr f
ncrash
27
![Page 28: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/28.jpg)
Analysis – Distribution of views Assume each p has an independent uniformly
distributed random view of size l In round r: In round r+1:
For l << |subs|maxF , this is estimated by l/(n-1)
1Pr lnp view
max1 | | 1 1Pr 1l l l l
n subs F l n np view
p in view p not removed
p not in view p enters view
28
![Page 29: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/29.jpg)
Analysis – Event propagation pr = Pr[p receives certain gossip message] ≥
sr,e = #processes that received event e by round r
Markov chain: pij = Pr[sr+1=j | sr=i] =
1 11 1 1 1l F Fn l n
p in view p is chosen message not lost p doesn’t crash
Doesn’t depend on l
( )(1 )
0
i j i i n jn iq q j i
j i
j i
q=1-pr
29
![Page 30: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/30.jpg)
Analysis – Event propagation Markov chain: pij = Pr[sr+1=j | sr=i] =
Distribution of sr:
( )(1 )
0
i j i i n jn iq q j i
j i
j i
q=1-pr
0
1 1Pr[ ]
0 1
js j
j
1Pr[ ] Pr[ ]r r iji j
s j s i p
30
![Page 31: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/31.jpg)
Analysis – Gossip rounds #rounds decreases as the fanout F increases Claim: #rounds increases logarithmically with
system size n Compare: diameter of a random graph is O(logn)
View size l does not influence #rounds But we needed to assume l << |subs|maxF , so the
subs buffer pays the price?
31
![Page 32: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/32.jpg)
Analysis – Partitioning
Pr[partition of size i]=
For constant n: decreases as l increases For constant l: decreases as n increases
1 1
( , , )1 1
i n ii n i
n l li n l
n ni
l l
•In one set: i views include only the other i-1,
• In the other set: n-i views include only the other n-i-1
32
![Page 33: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/33.jpg)
Analysis – PartitioningPr[no partition up to round r]=
Decreases very slowly with r Design: can choose l as a function of some required
probability of not partitioning In practice, add a hierarchy – a set of processes that
are always known to everyone
1 /2
( , , ) 1 ( , , )
r
l i n
n l r i n l
33
![Page 34: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/34.jpg)
Age-based message purging Replaces the randomly truncating of the
events buffer Each event e has an age parameter
Initialized to 0 by the application Incremented by every gossiping processes
While |events|>|events|max
Remove smallest id events from the same source Remove oldest events, according to their age
34
![Page 35: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/35.jpg)
Age-based message purging Evaluation:
Delivery ratio: ratio between number of messages delivered and number of messages sent per round.
Redundancy: fraction of same messages received by a certain process in a given round
Throughput: as a function of stability – delivered by 90% of the processes
Fault tolerance: delivery ratio in the presence of faults
35
![Page 36: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/36.jpg)
Frequency-based membership purging With random truncating, a new member has
the same probability of being removed as a well known member
Each element in subs has a frequency parameter Incremented each time it is received
Truncating: avg = average frequency in list1. Choose random element from list2. If its frequency > k·avg , then remove this element3. Otherwise, increment its frequency and goto 1
36
![Page 37: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/37.jpg)
Frequency-based membership purging Evaluation:
Propagation delay: number of informed processes as a function of the round number
Membership management: number of times membership information about a process is seen by others. Measured on processes removed from the subs buffer
37
![Page 38: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/38.jpg)
References Epidemic Algorithms for Replicated Database
Maintenance [Demers et al. 1987]
Bimodal Multicast [Birman et al. 1999]
Directional Gossip: Gossip in a Wide Area Network [Lin and Marzullo 1999]
Lightweight Probabilistic Broadcast [Eugster et al. 2003]
38
![Page 39: Probabilistic Broadcast Presented by Keren Censor 1.](https://reader035.fdocuments.net/reader035/viewer/2022062516/56649e415503460f94b3395c/html5/thumbnails/39.jpg)
Thank you :)
39