Database Reference
In-Depth Information
So, when alice updates her email address, we'll write that column to Cassandra at
QUORUM . When alice views her own profile, we'll also read her profile data from the
users table at the QUORUM consistency. By always using QUORUM when alice is inter-
acting with her own profile, we guarantee that she'll see the effects of all the changes she
has made.
When other users are viewing alice 's profile, however, we have no strong need for im-
mediate consistency. Here, bob will not know or care if the data he's seeing on alice 's
profile is a few milliseconds out-of-date. So, eventual consistency is perfectly acceptable
for the case of viewing another user's profile.
So, when displaying one user's profile to a different user, we'll use the more permissive
ONE consistency. These requests will be more resilient to node failures, and will also per-
form better and impose less load on the cluster, since they won't require coordinating
reads across multiple replicas.
Note
For a deeper dive into consistency in Cassandra, see the DataStax Cassandra documenta-
tion at http://www.datastax.com/documentation/cassandra/2.1/cassandra/dml/dm-
lAboutDataConsistency.html .
Search WWH ::




Custom Search