Most applications use Cassandra for its capability to perform low-latency read and write operations. When a cluster is all located in a single physical location, the network latency is low and bandwidth does not (typically) have a cost. However, when a cluster is spread across different geographical locations, latency and bandwidth costs are factors that need to be considered. Cassandra offers two consistency levels: LOCAL_QUORUM
and EACH_QUROUM
. This recipe shows how to use these consistency levels.
The consistency levels LOCAL_QUORUM
and EACH_QUORUM
only work when using a datacenter-aware strategy such as the NetworkTopologyStrategy
. See the recipe Scripting a multiple datacenter installation for information on setting up that environment.