Professional Documents
Culture Documents
and Reconfiguration
Wyatt Lloyd
Housekeeping
2. View changes
3. Reconfiguration
3
Review: Primary-Backup Replication
Clients
shl
4
From Two to Many Replicas
Clients
shl
6
Replica State
1. configuration: identities of all 2f + 1 replicas
7
Normal Operation (f = 1)
11
Today
2. View changes
• With Viewstamped Replication
• Using a View Server
3. Reconfiguration
12
Views
• Let different replicas assume role of primary over
time
P
View #3
P
View #1
P
View #2
13
View Change Protocol
15
Replica State (for View Change)
1. configuration: sorted identities of all 2f + 1 replicas
16
View Change Protocol (f = 1)
et cetera
Normal Operation:
20
Applying the Quorum Principle
View Change:
21
Split Brain (not all protocol messages shown)
Request Request
Client 1
Execute Execute
A (Primary)
Network partition
Execute Execute
B (New Primary)
Start-VC Start-View
C
Request Request
Client 2
2. View changes
• With Viewstamped Replication
• Using a View Server
3. Reconfiguration
23
Would Centralization Simplify Design?
24
View Server Protocol Operation
S2
Client
26
One Possibility: S2 in Old View
S2
Client
27
Also Possible: S2 in New View
S2
Client
28
Split Brain and View Changes
Take-away points:
2. View changes
3. Reconfiguration
30
The Need for Reconfiguration
• What if we want to replace a faulty replica with a
different machine?
• For example, one of the backups may fail permanently
32
Reconfiguration (1) (f = 1)
33
Reconfiguration (2) (f = 1)
Reconfiguration Reply
Client
new-config
PrepareOK
A (Primary)
B Prepare,
C (remove)
D (add)
Time à
Reconfiguration Reply
Client
new-config
StartEpoch
PrepareOK
A (Primary)
B Prepare,
Commit
C (remove)
D (add)
Time à
PrepareOK
A (Primary)
B Prepare,
Commit
C (remove)
D (add)
Time à
PrepareOK
A (Primary)
B Prepare,
Commit
C (remove)
D (add)
Time à
1. Respond to state transfer requests from others
• Waits until it receives f’ + 1 EpochStarteds, f’ is fault tolerance of new epoch
38
Conclusion: What’s Useful When
• Backups fail or has network connectivity problems?
• Minority partitioned from primary?
à Quorums allow primary to continue