Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 624979122 for ; Mon, 3 Oct 2011 22:15:50 +0000 (UTC) Received: (qmail 3322 invoked by uid 500); 3 Oct 2011 22:15:48 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 3293 invoked by uid 500); 3 Oct 2011 22:15:48 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 3285 invoked by uid 99); 3 Oct 2011 22:15:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Oct 2011 22:15:48 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL,TO_NO_BRKTS_PCNT X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.115.88.169] (HELO smtp-out-2.01.com) (216.115.88.169) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Oct 2011 22:15:40 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 25C57414047 for ; Mon, 3 Oct 2011 17:15:07 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp-out-2.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iCjLZ4Cfx5Zv for ; Mon, 3 Oct 2011 17:15:07 -0500 (CDT) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 046D941437E for ; Mon, 3 Oct 2011 17:15:07 -0500 (CDT) Received: from mail-1.01.com (mail.01.com [10.17.30.166]) by smtp-out-2.01.com (Postfix) with ESMTP id DCFFC414047 for ; Mon, 3 Oct 2011 17:15:06 -0500 (CDT) Date: Mon, 3 Oct 2011 17:15:06 -0500 (CDT) From: "Konstantin Naryshkin" To: user@cassandra.apache.org Subject: Re: node selection for replication factor 3 Message-ID: <237512e1-6092-4e38-8585-862a847586cd@klap> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Originating-IP: [10.17.31.171] X-Mailer: Zimbra 7.1.1_GA_3225 (Zimbra Desktop/7.1.2_10978_Windows) X-Virus-Checked: Checked by ClamAV on apache.org It picks sequentially (the two previous ones, I believe). So in your example it would be 105.12 and 105.11 ----- Original Message ----- From: "Ramesh Natarajan" To: user@cassandra.apache.org Sent: Monday, October 3, 2011 5:06:10 PM Subject: node selection for replication factor 3 I have 6 nodes in a cluster running RandonPartitioner with SimpleStrategy and replication factor 3. Lets say we insert a column with a QUORUM consistency. Based on the md5 hash it decides to go to node 10.19.104.11. How does cassandra pick the other 2 nodes? Is it sequential ( .12 and .13 ) or any random node? thanks Ramesh root@CAP4-CNode4 apache-cassandra-0.8.6]# ./bin/nodetool -h 127.0.0.1 ring Address DC Rack Status State Load Owns Token 141784319550391026443072753096570088105 10.19.104.11 datacenter1 rack1 Up Normal 19.92 GB 16.67% 0 10.19.104.12 datacenter1 rack1 Up Normal 19.3 GB 16.67% 28356863910078205288614550619314017621 10.19.104.13 datacenter1 rack1 Up Normal 18.57 GB 16.67% 56713727820156410577229101238628035242 10.19.104.14 datacenter1 rack1 Up Normal 19.34 GB 16.67% 85070591730234615865843651857942052863 10.19.105.11 datacenter1 rack1 Up Normal 19.88 GB 16.67% 113427455640312821154458202477256070484 10.19.105.12 datacenter1 rack1 Up Normal 20 GB 16.67% 141784319550391026443072753096570088105 [root@CAP4-CNode4 apache-cassandra-0.8.6]#