CAP Theorm :-

CAP Theorm :-

CAP Theorm is basically just an intiutive idea behind (C)onsistency V/S (A)vailability provided (P)artition occurs.

What it means is that in a distributed system, whenever there is a partition occurs, we genrally need to do a tradeoff between consistency and availabillity of the system. Here availability generally refers to availability of system as a whole, not just nodes in a distribuited system.

ian-battaglia-9drS5E_Rguc-unsplash.jpg

So, as common sense will say we definitely needs availability at its best right ? Well yes we need system almost all the time H/A (Another short form of Highly available), so we generally make tarde off in a system (obviously while designing a system) that it must be H/A and we tend to loose on consistency of data over all node.

Btw consistency is not that a heck of prob at high level overview, and eventually we achieve consistency over all nodes in a system over sometime. (Yes you guessed it this is another term for eventual consistency).

So in a distributed system, we prioritize availability and eventually we get consistency over some time like all the time.

This is very brief overview of CAP Theorm, If you need I'll do write a full fledged article around this and where it is used in actual system, to get more insight on same.