Minimum Cluster size to accommodate a single node failure

2014-06-18 Thread Prabath Abeysekara
Hi Everyone,

First of all, apologies if the $subject was discussed previously in this
list before. I've already gone through quite a few email trails on this but
still couldn't find a convincing answer which really made me raise this
question again here in this list.

If my understanding is correct, a *3 node Cassandra cluster* would survive
a single node failure while the Replication Factor is set to 3 with
consistency levels are assigned QUORUM for read/write operations. For
example, let's consider the following configuration.

* Number of nodes in the cluster : 3
* Replication Factor : 3
* Read/Write consistencies : QUORUM (this evaluates to 2 when RF is set to
3)

Here's how I expect it to work.

Whenever a read operation takes place, the Cassandra cluster coordinator
node that receives the read request would try to read from at least two
replicas before responding to the client. With Read consistency being 2 (+
all raws being available in all three nodes), we should be able to survive
a single node failure in this particular instance for read operations.
Similarly, for write requests, even in the middle of a single node failure,
the writes should be allowed as the Write consistency is set to 2?

Can someone please confirm whether what's mentioned above is correct?
(Please note that I'm trying to figure out the *minimum* node numbers and I
indeed am aware of the fact that there are other factors also to be
considered in order to come up with the most optimal numbers for a given
cluster requirement).


Cheers,
Prabath
-- 
Prabath


Re: Minimum Cluster size to accommodate a single node failure

2014-06-18 Thread Prabath Abeysekara
Sorry, the title of this thread has to be *Minimum cluster size to survive
a single node failure*.


On Wed, Jun 18, 2014 at 11:38 AM, Prabath Abeysekara 
prabathabeysek...@gmail.com wrote:

 Hi Everyone,

 First of all, apologies if the $subject was discussed previously in this
 list before. I've already gone through quite a few email trails on this but
 still couldn't find a convincing answer which really made me raise this
 question again here in this list.

 If my understanding is correct, a *3 node Cassandra cluster* would
 survive a single node failure while the Replication Factor is set to 3 with
 consistency levels are assigned QUORUM for read/write operations. For
 example, let's consider the following configuration.

 * Number of nodes in the cluster : 3
 * Replication Factor : 3
 * Read/Write consistencies : QUORUM (this evaluates to 2 when RF is set to
 3)

 Here's how I expect it to work.

 Whenever a read operation takes place, the Cassandra cluster coordinator
 node that receives the read request would try to read from at least two
 replicas before responding to the client. With Read consistency being 2 (+
 all raws being available in all three nodes), we should be able to survive
 a single node failure in this particular instance for read operations.
 Similarly, for write requests, even in the middle of a single node failure,
 the writes should be allowed as the Write consistency is set to 2?

 Can someone please confirm whether what's mentioned above is correct?
 (Please note that I'm trying to figure out the *minimum* node numbers and
 I indeed am aware of the fact that there are other factors also to be
 considered in order to come up with the most optimal numbers for a given
 cluster requirement).


 Cheers,
 Prabath
 --
 Prabath




-- 
Prabath


Re: Minimum Cluster size to accommodate a single node failure

2014-06-18 Thread Ben Bromhead
Yes your thinking is correct.

This article from TLP sums it all up beautifully 
http://thelastpickle.com/blog/2011/06/13/Down-For-Me.html 

Ben Bromhead
Instaclustr | www.instaclustr.com | @instaclustr | +61 415 936 359

On 18 Jun 2014, at 4:18 pm, Prabath Abeysekara prabathabeysek...@gmail.com 
wrote:

 Sorry, the title of this thread has to be Minimum cluster size to survive a 
 single node failure.
 
 
 On Wed, Jun 18, 2014 at 11:38 AM, Prabath Abeysekara 
 prabathabeysek...@gmail.com wrote:
 Hi Everyone,
 
 First of all, apologies if the $subject was discussed previously in this list 
 before. I've already gone through quite a few email trails on this but still 
 couldn't find a convincing answer which really made me raise this question 
 again here in this list.
 
 If my understanding is correct, a 3 node Cassandra cluster would survive a 
 single node failure while the Replication Factor is set to 3 with consistency 
 levels are assigned QUORUM for read/write operations. For example, let's 
 consider the following configuration.
 
 * Number of nodes in the cluster : 3
 * Replication Factor : 3
 * Read/Write consistencies : QUORUM (this evaluates to 2 when RF is set to 3)
 
 Here's how I expect it to work.
 
 Whenever a read operation takes place, the Cassandra cluster coordinator node 
 that receives the read request would try to read from at least two replicas 
 before responding to the client. With Read consistency being 2 (+ all raws 
 being available in all three nodes), we should be able to survive a single 
 node failure in this particular instance for read operations. Similarly, for 
 write requests, even in the middle of a single node failure, the writes 
 should be allowed as the Write consistency is set to 2? 
 
 Can someone please confirm whether what's mentioned above is correct? 
 (Please note that I'm trying to figure out the minimum node numbers and I 
 indeed am aware of the fact that there are other factors also to be 
 considered in order to come up with the most optimal numbers for a given 
 cluster requirement).
 
 
 Cheers,
 Prabath
 -- 
 Prabath
 
 
 
 -- 
 Prabath



Re: Minimum Cluster size to accommodate a single node failure

2014-06-18 Thread Ken Hancock
Another nice resource...

http://www.ecyrd.com/cassandracalculator/


Re: Minimum Cluster size to accommodate a single node failure

2014-06-18 Thread Robert Coli
On Tue, Jun 17, 2014 at 11:08 PM, Prabath Abeysekara 
prabathabeysek...@gmail.com wrote:

 First of all, apologies if the $subject was discussed previously in this
 list before. I've already gone through quite a few email trails on this but
 still couldn't find a convincing answer which really made me raise this
 question again here in this list.


http://mail-archives.apache.org/mod_mbox/cassandra-user/201403.mbox/%3CCAEDUwd1Qt=laph87q-uttatcstsojja7-g6cv76aqnjczp6...@mail.gmail.com%3E

and

http://mail-archives.apache.org/mod_mbox/cassandra-user/201404.mbox/%3CCAEDUwd2rhFwVXiByccJ1-VrPOYbDtd0LWGnzpU4CxA2u=mi...@mail.gmail.com%3E

tl;dr :

It depends on what you mean by minimum and survive. Most people
consider the minimum to use QUORUM to survive a single node failure
to be RF=N=3. The links elaborate on why that is not exactly correct, but
in many cases, it is correct enough.

=Rob