Written on October 25, 2024
Notes on CAP theorem
So CAP theorem states that Distributed systems can strive for three characteristics
However the CAP theorem states that there is a trade off between these three attributes, we can only choose two out of these three
We still be able to serve requests when there is some kind of failure. When some of our nodes in our distributed system become unavailable.
This is done by replicating data. For each piece of data, we have multiple copies spread across multiple DBs.
For our read request we will always get the latest write.
In case of a network failure between nodes, the system should work and try to get back to consistent state when failure disappears.
This doesn't mean databases don't have all three attributes. But the databases favours certain attributes in favour of other in case of a failure.