Sunday, 24 December 2017

Consistency vs Replication Factor




Points to be considered in the multi node cassandra setup :


1) For strong data consistency, Should have
(WriteConsistency + ReadConsistency) > ReplicationFactor

2) For Handling Node failures, Should have
(write consistency < Replication Factor) AND (read consistency > 1 AND read consistency < Replication Factor)
Example : Quorum is the best setup for handling node failures
(i.e) Quorum = (RF / 2) + 1

3) Having Same Replication Factor with Write / Read consistency will have Zero Node Failures



DataConsistency :


Cluster Size
Replication
Factor
Write and Read Consistency
Number of node failures it can handle
Number of nodes to read for consistency & Async Read
Number of nodes to write for consistency
& non-consistent Write
Recommended
5 nodes
5
3
WC = 2, RC = 2
(Quorum)
1
Read = 2,
Async Read = 1
Write = 2,
non-cons Write = 1
Yes
5
3
WC = 3, RC = 1

0
Read = 1,
Async Read = 2
Write = 3,
non-cons Write = 0
No
(Zero Node
Failures)
5
4
WC = 2, RC = 2
(Quorum)
2
Read = 2,
Async Read = 2
Write = 2,
non-cons Write = 2
No
(Eventually
Consistent)
5
4
WC = 3, RC = 2

1
Read = 2,
Async Read = 2
Write = 3,
non-cons Write = 1
Yes
3 nodes
3
3
WC = 2, RC = 2
(Quorum)
1
Read = 2,
Async Read = 1
Write = 2,
non-cons Write = 1
Yes
3
3
WC = 3, RC = 1
0
Read = 1,
Async Read = 2
Write = 3,
non-cons Write = 0
No
(Zero Node
Failures)
3
2
WC = 2, RC = 1
0
Read = 1,
Async Read = 1
Write = 2,
non-cons Write = 0
No
(Zero Node
Failures)
4 nodes
4
3
WC = 2, RC = 2
(Quorum)
1
Read = 2,
Async Read = 1
Write = 2,
non-cons Write = 1
Yes
4
2
WC = 2, RC = 1
0
Read = 1,
Async Read = 1
Write = 2,
non-cons Write = 0
No
(Zero Node
Failures)






No comments:

Post a Comment