Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BDCC3200C1D for ; Thu, 16 Feb 2017 21:02:52 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BC5B2160B61; Thu, 16 Feb 2017 20:02:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1316F160B52 for ; Thu, 16 Feb 2017 21:02:51 +0100 (CET) Received: (qmail 25249 invoked by uid 500); 16 Feb 2017 20:02:46 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 25238 invoked by uid 99); 16 Feb 2017 20:02:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2017 20:02:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id BEF93C18AF for ; Thu, 16 Feb 2017 20:02:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id KzvO17Y93hdD for ; Thu, 16 Feb 2017 20:02:44 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 796F75FB6B for ; Thu, 16 Feb 2017 20:02:44 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E6D2EE0793 for ; Thu, 16 Feb 2017 20:02:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id B254124127 for ; Thu, 16 Feb 2017 20:02:41 +0000 (UTC) Date: Thu, 16 Feb 2017 20:02:41 +0000 (UTC) From: "Connor Warrington (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-13225) Best Consistency Level MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 16 Feb 2017 20:02:52 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-13225?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D15870607#comment-15870607 ]=20 Connor Warrington commented on CASSANDRA-13225: ----------------------------------------------- I was looking at the statistics from the 9318 JIRA and that's pretty much w= hat I was hoping to accomplish. Less mutations dropped and less hints writt= en. Yes, I get we aren't waiting for all replicas but we kinda are because of t= he rate limiting feedback loop. > Best Consistency Level > ---------------------- > > Key: CASSANDRA-13225 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1322= 5 > Project: Cassandra > Issue Type: New Feature > Reporter: Connor Warrington > Priority: Minor > > When writing data into a cluster there are a few consistency levels to ch= oose from. When choosing the consistency level to write with you are making= a tradeoff between consistency and failover availability. If you choose co= nsistency level ALL then all replicas have to be up and when a write succee= ds all replicas received the write. If you choose consistency level QUORUM = then a quorum number of replicas have to be up and when a write succeeds at= quorum number of replicas received the write. The tradeoff comes in when t= here are more then quorum nodes available for the write. We would like a wr= ite to succeed only when all replicas that are up have received the write. = Hence the suggestion of best as a consistency level. This would be availabl= e for the existing consistency levels. The main idea behind this feature re= quest is that we are okay with a replica going down (fault tolerance) but w= hen the cluster is in a good state we don't mind waiting for all nodes to g= et the write. This would enable the writer to operate at speed of the slowe= st node instead of potentially getting into a state where that slow node ge= ts even further behind. This would also enable back pressure to be better p= ropagated through the system as the slowest node likely has back pressure w= hich is trying to tell the client about but if we don't wait for that node = the writer loses that information. > Example scenarios: > If we have replication factor of 3:=20 > ALL consistency means 3 replicas have to be up and 3 replicas have to suc= cessfully get the write.=20 > QUORUM consistency means 2 replicas have to be up and 2 replicas have to = successfully get the write.=20 > BEST_QUORUM consistency means 2 replicas have be up and all up replicas h= ave to successfully get the write. > If 3 replicas are up with replication factor of 3:=20 > ALL would succeed as all 3 replicas are up and would return success when = all 3 replicas get the write=20 > QUORUM would succeed as all 3 replicas are up and would return success wh= en 2 replicas get the write=20 > BEST_QUORUM would succeed as all 3 replicas are up and would return succe= ss when all 3 replicas get the write > If 2 replicas are up with replication factor of 3:=20 > ALL would fail as only 2 replicas are up=20 > QUORUM would succeed as 2 replicas are up and would return success when 2= replicas get the write=20 > BEST_QUORUM would succeed as 2 replicas are up and would return success w= hen 2 replicas get the write -- This message was sent by Atlassian JIRA (v6.3.15#6346)