user3726031
user3726031

Reputation: 279

Multidatacenter consistency

WIth multi data center, do we have a option where the consistency can be tuned to check the latest data in both the data centers before fetching data? like one, quorom or All is specific to data center. Can we do the same to check consistency of the data in both data centers? If we have replication factor 3 and 3 for both data centers. Does each_quorum solve this issue or we have consistency level ALL where it checks consistency in 6 nodes in both dcs'?

Upvotes: 0

Views: 103

Answers (2)

adutra
adutra

Reputation: 4536

EACH_QUORUM is probably what you want, but unfortunately, EACH_QUORUM for reads is not supported anymore: see this topic on the Java driver mailing list for an explanation.

If your writes are done with EACH_QUORUM or higher, then simply do your reads with LOCAL_QUORUM and you will achieve the desired consistency level. If not, you will have to read with consistency ALL, at the (very likely) risk of having some of your reads fail if not all replicas in both DCs are alive.

Upvotes: 1

Alex Popescu
Alex Popescu

Reputation: 4002

As per the documentation, EACH_QUORUM achieves this:

Used in multiple data center clusters to strictly maintain consistency at the same level in each data center. For example, choose this level if you want a read to fail when a data center is down and the QUORUM cannot be reached on that data center.

Upvotes: 1

Related Questions