incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Schuller <peter.schul...@infidyne.com>
Subject Re: Replicating to all nodes
Date Wed, 13 Jul 2011 22:41:27 GMT
> Read and write operations should succeed even if only 1 node is online.
>
> When a read is performed, it is performed against all active nodes.

Using QUORUM is the closest thing you get for reads without modifying
Cassandra. You can't make it wait for all nodes that happen to be up.

> When a write is performed, it is performed against all active nodes,
> inactive/offline nodes are updated when they come back online.

Writes always go to all nodes that are up, but if you want to wait for
them before returning "OK" to the client than no - except CL.ALL
(which means you don't survive one being down) and CL.QUORUM (which
means you don't wait for all if all are up).

> I don't believe it does. Currently the replication factor is hard
> coded based on key space, not a function of the number of nodes in the
> cluster. You could say, if N = 7, configure replication factor = 7,
> but then if only 6 nodes are online, writes would fail. Is this
> correct?

No. Reads/write fail according to the consistency level. The RF +
consistency level tells how many nodes must be up and successfully
service the request in order for the operation to succeed. RF just
tells you the number of total nodes int he replicate set for a key;
whether an operation fails is up to the consistency level.

I would ask: Why are you trying to do this? It really seems you're
trying to do the "wrong" thing. Why would you ever want to replicate
to all? If you want 3 copies in total, then do RF=3 and keep a 3 node
ring. If you need more capacity, you add nodes and retain RF. If you
need more redundancy, you have to increase RF. Those are two very
different axis along which to scale. I cannot think of any reason why
you would want to tie RF to the total number of nodes.

What is the goal you're trying to achieve?

-- 
/ Peter Schuller (@scode on twitter)

Mime
View raw message