Re: Definition of QUORUM consistency level

2017-06-28 Thread Dikang Gu
https://issues.apache.org/jira/browse/CASSANDRA-13645 On Wed, Jun 28, 2017 at 4:59 PM, Dikang Gu wrote: > We implement the patch internally, and deploy to our production clusters, > we see 2X drop of the P99 quorum read latency, because we can reduce one > unnecessary cross region read. This is

Re: Definition of QUORUM consistency level

2017-06-28 Thread Dikang Gu
We implement the patch internally, and deploy to our production clusters, we see 2X drop of the P99 quorum read latency, because we can reduce one unnecessary cross region read. This is a huge improvement since performance is very critical to our customers. Again, I'm not trying to change the defi

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 d

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 min

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 W

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 wrote: >

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 th

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 wr

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
> 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 need (N/2) for read, >

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 for QUORUM consisten

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 Ca

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 wou