//

CAP Theorem

CAP theorem states that if there is partitioning in the distributed system then the system can either offer Consistency or Availability.

Let’s understand it in detail

Consistency

Consistency means that at any given time all the nodes of the distributed system should give same response. 

Eg, Suppose there are two nodes, A and B

If I update A with some value and retrieve that value from B it should give me the updated value. If it fails to deliver so, we can say that the system is not consistence. (Also, the availability of the system is not guaranteed)

Availability

Availability means that you are able to interact with the system at any given time.

E.g., Continuing with the previous example

Even if node A fails the node B should be handling the request (consistency is not guaranteed)

Partition Tolerance

Where there is partitioning is system. suppose due to a network issue or hardware issue if some of the nodes are not working then there will multiple subsystems which 

Let’s suppose there is a distributed system with multiple nodes

A – B – C

|

D – E

Leave a Reply

Your email address will not be published. Required fields are marked *