Leaderless Replication | Replication In Distributed Database - Part - 4

preview_player
Показать описание
00:00 Leaderless Replication
02:50 Read and write Quorum
11:46 Read repair and anti entropy
14:34 Sloppy quorum and hinted handoff

Leaderless Replication
- Peer to peer like dynamo, Cassandra

Writing to the Database When a Node Is Down

Quorum
- Min no Vote to make decision
- r + w greater than n, n= no of replica
w=n, w=1, read heavy system, highly optimized for reads with high latency of write. Even single node failure will result in writes getting blocked.

Read repair - Reading value from a replica and updating the key with the latest value from other replica.
Anti-entropy - Comparing data on each replica with the value on the other and updating each replica to the latest version.
Limitations of Quorum Consistency
- Sloppy quorum is used
- Because of concurrent write, the value is merged and overwritten
- Reads coincides with write and value is updated in few replica
- If the node with the latest value itself failed, then while recovery data is copied from the replica with old value, in that case number of replica carrying new value will become below w, which breaks the quorum condition
Sloppy Quorums and Hinted Handoff
When the host node where data has to be written is down, temporarily the data can be written to other node, so that write quorum w is met
When the host node is back the data is written back to host node which is called hinted handoff
Рекомендации по теме