Reputation: 54
I have two Cassandra datacenter, but all the servers are in the same building, connected with 10 gbps
network.
I don't plan to have servers in another location.
The RF is 2 in each datacenter.
I need to ensure strong consistency, so I plan to use QUORUM.
Question : are there any advantages for me of using LOCAL_QUORUM instead of QUORUM ?
Thank you
Upvotes: 3
Views: 1625
Reputation: 1
As mentioned by Aaron, you'd have no fault tolerance with local_quorum in this configuration, so I think it's worth considering to add a new node to each of these DCs.
By doing that, you'd maintain local_quorum of 2 (against a new quorum of 4) but become fault tolerant and survive if a node goes down on each side.
Upvotes: 0
Reputation: 57798
Are there any advantages for me of using LOCAL_QUORUM instead of QUORUM?
The most important consideration here, is that with 2 DCs with RF == 2, QUORUM
and LOCAL_QUORUM
equate to different values (number of replicas to be contacted).
LOCAL_QUORUM
== 2QUORUM
== 3So the advantage I see with LOCAL_QUORUM
, would be that the application would be waiting on fewer replicas. With 2 DCs and 2 replicas in each DC, operations @ LOCAL_QUORUM
would wait for responses from 2 replicas.
QUORUM
operations would consider all 4 replicas across the cluster, and wait for a response from 3. So there would likely be a slight performance advantage to LOCAL_QUORUM
(awaiting fewer replicas to respond).
The downside, is that using LOCAL_QUORUM
in this case wouldn't be able to tolerate a node being down. So if a single node crashed or became unresponsive, then all operations will fail until that node is resurrected.
Upvotes: 3