Seminar 10: Quorum-Based Protocols
Goal:
- Gifford's Scheme of Voting for supporting replicated writes
- Apply Gifford Quorum-Based protocol to a set of examples and look for Conflicts.
Definitions:
Quorum-Based Protocols:
- Resolves write-write or read-write conflicts
- Client processes are required to request and acquire the permission of multiple servers before reading and writing a replicated data item.
- Example protocol (on a distributed file system):
- A process that wants to update a replicated file first contacts at majority of servers and get them to agree to do the update.
- Once they agreed, the file is changed and a new version number is associated with the file.
- To read a replicated file, a client must also contact at least half the servers plus one and ask them to send the version numbers associated with the file.
- If all version numbers agree then the file is the most recent one.
Gifford's Scheme:
- N replicas exist.
- To read a file, a client needs to assemble a Read Quorum:
- An arbitrary collection of any NR servers.
- To write a file, a client needs to assemble a Write Quorum:
- An arbitrary collection of any NW servers
- Constraints: The values NR and NW are subject to following constraints:
- . NR + NW > N
- . NW > {$ \frac{N}{2} $}
- The first constraint prevents Read-Write conflicts
- The second constraint prevents Write-Write conflicts
Examples:
Example 1: N = 12 , NR = 3 , NW = 10
A correct choice of read and write set
Example 2: N = 12 , NR = 7 , NW = 6
- A Write-Write conflict may occur because NW <= {$ \frac{N}{2} $}.
- One client may choose (A, B, C, E, F,G) as its write set and another client may choose (D,H, I, J,K, L) as its write set.
- Trouble as the two updates will both be accepted without detecting that they actually conflict.
Example 3: N = 12 , NR = 1 , NW = 12
- Sets NR to one, making it possible to read a replicated file by finding any copy and using it.
- Read-One, Write-All (ROWA).
EXERCISE Given below are the N, NR, NW, Where N denotes the total number of replica servers available; NR denotes the read quorum and NW denotes the write quorum. Against each, denote whether the combination is a correct choice or not using above mentioned constraints:
- N = 5 , NR = 2 , NW = 4
- N = 16 , NR = 8 , NW = 10
- N = 16 , NR = 9 , NW = 8
- N = 10 , NR = 1 , NW = 10
- N = 11 , NR = 4 , NW = 5
- N = 20 , NR = 6 , NW = 11
Deliverables of practical session: A PDF file containing the answers to above exercise
Referrences:
- Distributed Systems, Third edition, Version 3.02 (2018) by Maarten van Steen and Andrew S. Tanenbaum