Title: Shameless Statements about Replication
1Shameless Statements about Replication
Rachid Guerraoui
School of Computer and Communication Sciences,
EPFL
Joint ruminations with Eli Gafni (UCLA-MSR)
2Replication is all over the place
- Non-blocking data structures
3Deconstructing replication
Highlight the important principles
(results/algorithms)
4A perspective on replication
5A grain of salt
Here are my principles. If you dont like them,
I have others
Groucho Marx
6Deconstructing replication
- For now, lets
- (1) ignore performance
- and focus on
- (2) strong and general replication of
- (3) an object shared by 2 processes
7Replication
opA
opA
P1
O
P2
opB
opB
8(No Transcript)
9(No Transcript)
10Replication
P1
opB
opA
opA
O
Fair agreement on the order
P2
O
opB
opA
opB
11Replication
P1
opB
opA
opA
O
Shared memory
Consensus
P2
O
opB
opB
opA
12Statement
- (1) Behind every replication lie a
- consensus and a shared memory
Consensus
13Consensus is impossible FLP
Asynchronous shared memory system
p1
p2
14Synchronous consensus is possible
Synchronous system
Asynchronous system
15ltgtSynchronous consensus is possible
ltgtSynchronous system
Asynchronous system
16Consensus is almost possible
?-synchronous system
17One person is missing and the whole world seems
depopulated Alphonse de
la Martine
p2
p1
- Consensus is possible iff ?-synchrony
18Bottom line
- (1) Behind every replication lie a
- consensus and a shared memory
- (2) Behind every consensus lies some
- ?-synchrony
?-synchrony
19(No Transcript)
20Consensus (primary)
P1
V1
V1
Shared memory
P2
V2
V1
21Consensus (primary)
P1
crash
V1
V1
Shared memory
P2
V2
22Consensus (primary-backup)
P1
V1
V1
V1
Shared memory
P2
V2
V1
23Consensus (primary-backup)
P1
crash
V1
V1
Shared memory
P2
V2
V2
24Consensus (primary-backup)
P1
V1
V1
V1
Shared memory
P2
V2
V2
V2
25Consensus (2PC)
P1
commit
V1
V1
V1
Shared memory
P2
V2
V1
26Consensus (2PC)
P1
V2
V1
Shared memory
P2
V2
commit
V2
V2
27Consensus (2PC)
P1
V1
abort
V1
Shared memory
P2
V2
abort
V2
28Towards indulgent consensus
Asynchronous system
- Indulgence tolerates arbitrarily long periods of
asynchrony, i.e., tolerates any prefix
29Indulgence
30Indulgence
 He that is without sin among you, let him cast
the first stone at her  John 83-11
31Indulgence
Always preserves safety
Ensures liveness whenever possible
-  While there is life there is hope Cicero
32Indulgent consensus (3PC)
P1
V1
commit/abort
commit/abort
P2
V2
33Indulgent consensus (3PC)
- The processes dynamically exclude one suffix of a
run, using a system oracle
A failure detector
34Weakest failure detector
- The weakest failure detector question translates
into the smallest suffix set to be excluded
- The weakest failure detector for consensus - ?
35Weakest failure detector
p1
p2
36Shared memory assumption
- Helps better understand consensus results (FLP,
FD, 2PC, 3PC)
Needed anyway for replication (and indulgent
consensus)
37Bottom line
- (1) Behind every replication lie a
- consensus and a shared memory
- (2) Behind every consensus lies some
- ?-synchrony
shared memory
38ABD (Snapshot)
write
P1
V1
Quorum
P2
V2
read
39The many faces of quorums
Byzantine quorums
Probabilistic quorums
Failure detector quorums
Refined quorums
40Bottom line
- (1) Behind every replication lie a
- consensus and a shared memory
- (2) Behind every consensus lies some
- ?-synchrony
- (3) Behind every shared memory lies
- a quorum
41Deconstructing replication
- And focusing on
- (2) strong and general replication of
- (3) one object shared by 2 processes
42The engineer
Much ado about nothing?
- In real systems, we do care about performance and
we are happy with weak replication
43What about performance?
Lets move now to a message passing system with
communication delays/rounds
44What about performance?
Synchronous system with few failures
Asynchronous system
- Plan for the worst and hope for the best
45What about performance?
- How many synchronous rounds does consensus need?
At least t1
A shared memory system of n processes with 1
failure can simulate x rounds of a synchronous
system with x failures
46The inherent price of indulgence
- How many synchronous rounds does an indulgent
consensus need to decide with f failures?
At least f2
A shared memory system of n processes with 1
failure can simulate x1 synchronous rounds of an
indulgent consensus algorithm with x failures
47The inherent price of indulgence
- For how long does a system need to be synchronous
for indulgent consensus to terminate?
No clue
48The inherent price of indulgence
- How many servers need to be correct in order for
indulgent consensus to decide in x synchronous
rounds?
Refined quorums
49More about performance
- Disk accesses?
- Throughput?
50What about weak replication?
- Is consensus necessary for weak replication?
If replicas would never need to agree on any
state, they would not be called replicas
51What is weak replication?
The answer, my friend, is blowin' in the wind
52What about weak replication?
Does ad-hoc replication need consensus?
Say we know the semantics of an object, e.g., a
queue? (weaker than consensus)
We need consensus among 2 processes
53What about weak replication?
- Does eventual replication need consensus?
- Does probabilistic replication need consensus?
- It does need randomized consensus..
54What if
- We give up safety and let some of the replicas
disagree?
- We might need set-agreement
- We give up liveness and ensure termination only
if k processes are concurrent?
- We might need set-agreement
55The future of replication
- What form of quorum (shared memory) does a
set-agreement actually need?
- For how long does a system need to be synchronous
for indulgent set-agreement to terminate?
56The one slide to remember
- (1) Behind every replication lie
- agreement and shared memory
- (2) Behind every agreement lies
- ?-synchrony
- (3) Behind every shared memory lies
- a quorum
57Or at least this one
58What about more processes?
n-process (f-1)-resilient system
f-process wait-free system