How can we implement read-after-write consistency in a system with leader-based replication? There are various possible techniques. To mention a few: When reading something that the user may have modified, read it from the leader; otherwise, read it from a follower. This requires that you have some way of knowing whether something might have been modified, without actually querying it. For example, user profile information on a social network is normally only editable by the owner of the profile, not by anybody else. Thus, a simple rule is: always read the user’s own profile from the leader,
...more
This highlight has been truncated due to consecutive passage length restrictions.