Tutoria 6: REPLICATION Flashcards
1
Q
Figure 1.1 is a diagram showing the primary-backup model where one of the replicas is assigned the role of the primary replica. Every read and write request by clients is managed by the primary replica.
Consider the four possible crash scenarios described in the following. Discuss consequences and possible solutions.
- The primary replica fails after sending the response.
- The primary replica fails before sending the response but after receiving the acknowledgments from the backup replicas.
- The primary replica fails before sending the update messages.
- The primary fails after sending update messages and before receiving the acknowledgments.
A
- If the client receives the response everything is fine with the update process. All values are written and the client is informed. For the next update a new primary replica must be assigned. Therefore the backup replicas can use an election algorithm (e.g., bully, ring). Another possibility would be to determine a fixed order of primary backups in the beginning.
- As the client didn’t receive a response, he retransmits the update message although the update was already processed by the primary and both replicas. In this case, we have to make sure that the update is not processed multiple times. A possible solution would be to use an invocationId that the client sends with every request. Then the replica could recognize whether the update has already been processed.
- Like in Scenario 1, a new primary replica has to be assigned. The update is lost, anyway. Therefore the client retransmits its update to the new primary replica.
- Like in Scenario 1, if the client doesn’t receive the acknowledgment.
2
Q
Exercise 1, 2 and 3 see tutorial
A