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
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.