CAP theorem states that it is impossible for a distributed datastore to simultaneously provide more than two out of the following three guarantees:
But what is Consistency, Availability & Partition tolerance? How does it help us to architect better systems? Let’s find out the answers to these questions.
A system is consistent when it is able to return the latest data immediately after creation/modification.
In the architecture below, we have 3 databases — one primary and 2 replicas. All writes go to the primary database and synchronously replicated to all replicas. Replicas are…
In computer science, consistent hashing is a special kind of hashing such that when a hash table is resized, only n/m keys need to be remapped on average where n is the number of keys and m is the number of slots
That is Wikipedia definition of consistent hashing! Firstly, who understands Wikipedia definitions? Not many right? So let’s try to break open the definition and see what’s there for us to learn.
Let’s say we want to create a social media website that allow users to share posts. Let’s keep the post as a simple message for now. So…
Software engineer passionate about technology, teaching and management