Distributed System’s Impossible dream – CAP Theorm Part 1

To dream the impossible dream
To fight the unbeatable foe
To bear with unbearable sorrow
To run where the brave dare not go

— An extract from “Mad men are children of God” by Dale Wasserman

CAP theorem in distributed systems means that a distributed system can deliver only two of three desired characteristics: consistencyavailabilityand partition tolerance (the ‘C,’ ‘A’ and ‘P’ in CAP).

What is CAP

Consistency

Gilbert and Lynch(people who proved this theorm) describe consistency as any read operation that begins after a write operation must return that value, or the result of a later write operation.

Sounds simple, lets look at another way of looking at it.

All the consumer or client should see that same data at any point of time irrespective of the distributed nodes they are querying.

From system perspective, whenever a data is written to the same node. It should be replicated to all the nodes in the system before system is being queried again.

Availability

Gilbert and Lynch(people who proved this theorm) describe availability as every request received by a non-failing node in the system must result in a response.

Another way to state this—all working nodes in the distributed system return a valid response for any request, without exception.

Partition tolerance

Gilbert and Lynch describe partitions as the network will be allowed to lose arbitrarily many messages sent from one node to another.

Partition tolerance means that the cluster must continue to work despite any number of communication breakdowns between nodes in the system.

Thats all for this one. I will be explaining the proof of CAP theorm with real life systems in part 2. Stay tunned!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: