2

Say I want my replication factor N=10 and I want my R=4 and W=7 such that R + W > N.

How can I configure this in cassandra? I know what quorum does but thats not what I am looking for.

user1870400
  • 6,028
  • 13
  • 54
  • 115
  • I get that you're attempting to guarantee consistency, but it's not do-able the way you've described. – LHWizard Oct 08 '15 at 18:10

1 Answers1

1

I'm afraid you can't set explicit values for the number of required replicas. It's probably also not a good idea in first place. Cassandra has been designed for scalability in mind: adding nodes to your cluster would require to recalculate and reconfigure those values every time.

If you really insist on using your own consistency levels, I'd suggest to try using the DowngradingConsistencyRetryPolicy and check the returned ExecutionInfo for each query to see if the number of required replicas have been meet. The idea would be to always try the next stronger level (e.g. QUORUM for 4, ALL for 7) and have your application decide to retry the operation in case the ExecutionInfo would not indicate the number of replicas you think would be required.

Stefan Podkowinski
  • 5,206
  • 1
  • 20
  • 25