Re: Definition of QUORUM consistency level

2017-06-08 Thread Jeff Jirsa
Short of actually making ConsistencyLevel pluggable or adding/changing one of the existing levels, an alternative approach would be to divide up the cluster into either real or pseudo-datacenters (with RF=2 in each DC), and then write with QUORUM (which would be 3 nodes, across any combination of

Re: Definition of QUORUM consistency level

2017-06-08 Thread Justin Cameron
Firstly, this situation only occurs if you need strong consistency and are using an even replication factor (RF4, RF6, etc). Secondly, either the read or write still need to be performed at a minimum level of QUORUM. This means there are no extra availability benefits from your proposal (i.e. a

Re: Definition of QUORUM consistency level

2017-06-08 Thread Jeff Jirsa
Would love to see real pluggable consistency levels. Sorta sad it got wont-fixed - may be time to revisit that, perhaps it's more feasible now. https://issues.apache.org/jira/browse/CASSANDRA-8119 is also semi-related, but a different approach (CL-as-UDF) On Thu, Jun 8, 2017 at 9:26 PM, Brandon

Re: Definition of QUORUM consistency level

2017-06-08 Thread Brandon Williams
I don't disagree with you there and have never liked TWO/THREE. This is somewhat relevant: https://issues.apache.org/jira/browse/CASSANDRA-2338 I don't think going to CL.FOUR, etc, is a good long-term solution, but I'm also not sure what is. On Thu, Jun 8, 2017 at 11:20 PM, Dikang Gu

Re: Definition of QUORUM consistency level

2017-06-08 Thread Dikang Gu
To me, CL.TWO and CL.THREE are more like work around of the problem, for example, they do not work if the number of replicas go to 8, which does possible in our environment (2 replicas in each of 4 DCs). What people want from quorum is strong consistency guarantee, as long as R+W > N, there are

Re: Definition of QUORUM consistency level

2017-06-08 Thread Nate McCall
> We have CL.TWO. > > > This was actually the original motivation for CL.TWO and CL.THREE if memory serves: https://issues.apache.org/jira/browse/CASSANDRA-2013

Re: Definition of QUORUM consistency level

2017-06-08 Thread Brandon Williams
We have CL.TWO. On Thu, Jun 8, 2017 at 10:03 PM, Dikang Gu wrote: > So, for the quorum, what we really want is that there is one overlap among > the nodes in write path and read path. It actually was my assumption for a > long time that we need (N/2 + 1) for write and just

Re: Definition of QUORUM consistency level

2017-06-08 Thread Nate McCall
> > > So, for the quorum, what we really want is that there is one overlap among >> the nodes in write path and read path. It actually was my assumption for a >> long time that we need (N/2 + 1) for write and just need (N/2) for read, >> because it's enough to provide the strong consistency. >> >

Re: Definition of QUORUM consistency level

2017-06-08 Thread Nate McCall
> So, for the quorum, what we really want is that there is one overlap among > the nodes in write path and read path. It actually was my assumption for a > long time that we need (N/2 + 1) for write and just need (N/2) for read, > because it's enough to provide the strong consistency. > You are

Re: Definition of QUORUM consistency level

2017-06-08 Thread Dikang Gu
So, for the quorum, what we really want is that there is one overlap among the nodes in write path and read path. It actually was my assumption for a long time that we need (N/2 + 1) for write and just need (N/2) for read, because it's enough to provide the strong consistency. On Thu, Jun 8, 2017

Re: Definition of QUORUM consistency level

2017-06-08 Thread Jonathan Haddad
It would be a little weird to change the definition of QUORUM, which means majority, to mean something other than majority for a single use case. Sounds like you want to introduce a new CL, HALF. On Thu, Jun 8, 2017 at 7:43 PM Dikang Gu wrote: > Justin, what I suggest is that

Re: Definition of QUORUM consistency level

2017-06-08 Thread Dikang Gu
Justin, what I suggest is that for QUORUM consistent level, the block for write should be (num_replica/2)+1, this is same as today, but for read request, we just need to access (num_replica/2) nodes, which should provide enough strong consistency. Dikang. On Thu, Jun 8, 2017 at 7:38 PM, Justin

Re: Definition of QUORUM consistency level

2017-06-08 Thread Justin Cameron
2/4 for write and 2/4 for read would not be sufficient to achieve strong consistency, as there is no overlap. In your particular case you could potentially use QUORUM for write and TWO for read (or vice-versa) and still achieve strong consistency. If you add additional nodes in the future this

Definition of QUORUM consistency level

2017-06-08 Thread Dikang Gu
Hello there, We have some use cases are doing consistent read/write requests, and we have 4 replicas in that cluster, according to our setup. What's interesting to me is that, for both read and write quorum requests, they are blocked for 4/2+1 = 3 replicas, so we are accessing 3 (for write) + 3