Klun
Klun

Reputation: 54

Cassandra : LOCAL_QUORUM vs QUORUM, when all datacenter/servers are physically locals, on the same 10gbps network

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

Answers (2)

Guilherme
Guilherme

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

Aaron
Aaron

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 == 2
  • QUORUM == 3

So 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

Related Questions