Book Image

Learning Apache Cassandra

By : Matthew Brown
4 (1)
Book Image

Learning Apache Cassandra

4 (1)
By: Matthew Brown

Overview of this book

Table of Contents (19 chapters)
Learning Apache Cassandra
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Consistency


Masterless replication confers huge advantages in maintaining full availability in the face of hardware failure, but it also creates a thorny, if subtle, problem: how can we be sure that the data we're reading is the most recent version of that data?

Let's first consider the master-follower architecture we discussed above. When our application issues a write request to the master instance, that request only returns a successful response once the data has been successfully written to the master instance. A successful response does not, however, guarantee that the data has been replicated to all of the followers: any master-follower system will involve some delay before write are replicated to the followers.

Still, in this system, there is a simple way to guarantee that, when we read a piece of data, we're reading the most up-to-date version of it: simply read from the master. Of course, if we only ever read from the master, the followers don't do much for us other than providing...