Masterless replication offers 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 earlier. 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 writes 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...