by slashdev · 2y ago · 0 comments
When too many nodes fail or are unreachable, do you sacrifice consistency, or availability?
And even then it's misleading, because you can still be consistent and partially sacrifice availability (allow local or mergable updates) or be available but partially consistent (allow updates, but have potential conflicts to resolve, maybe manually, when the partition is healed.)
You can even make different A <-> C tradeoffs per request/transaction.
Distributed system are complex, who knew?
Don’t forget the nasty bit about partitions: if I think nodes 1-5 are reachable and the rest are unreachable, I can’t assume that the rest of the nodes are down or idle — some other client may think that nodes 1-5 are unreachable but nodes 6-15 are reachable.
It takes time for all nodes to come to agreement and in that time I am able to request _technically_ out of date info from a node.
Consistency is often the one CAP that isn’t prioritized because if the network isn’t consistent for a few seconds, the application probably still works and that’s the case for bitcoin.
The network is “eventually consistent”