Order operations based on their happened_before relationship
When a client makes a request to the backend, return a response to the client then use passive replication to send the new information to the other replicas. We use versioning to keep track of the history of updates.
- While a post is trending and tons of upvotes are coming in, we don’t need to know the exact amount of upvotes on the post. As the upvotes settle down, we want to aim to have similar upvote values on each replica
Another Example: Email Inbox
What if a one replica can’t talk to the other replicas due to a network partition? (it can still talk to the frontend)
- We should try to talk to the majority of nodes rather than just the one that is network partitioned
The majority of nodes are in quorum when they all have data
- Read and Write requests go to the majority of nodes
- The nodes heal by checking with a majority of nodes to see if they have the latest data