Skip to content

Instantly share code, notes, and snippets.

@jki127
Created November 7, 2018 18:18
Show Gist options
  • Save jki127/8666c7d212535b5c355c724660343635 to your computer and use it in GitHub Desktop.
Save jki127/8666c7d212535b5c355c724660343635 to your computer and use it in GitHub Desktop.

Consistency (cont’d) - DistSys Lecture - Nov 6th, 2018 (Part 2)

Causal Consistency (review)

Order operations based on their happened_before relationship

Eventually Consistent

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.

Example: Reddit Upvotes

  • 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

Quorum - when the majority agrees

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment