3 ms·
CAP really should have been formulated as: When too many nodes fail or are unreachable, do you sacrifice consistency, or availability? And even then it's misl
by slashdev 3y ago
CAP really should have been formulated as:
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?
- eimrine 3y agoWhat sacrifies Bitcoin? It seems to be always available and always consistent.
- Rexxar 3y agoPartition
- dartos 3y agoIt’s not consistent. 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”
- amluto 3y ago> When too many nodes fail or are unreachable 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.
- slashdev 3y agoThat's correct
- rstuart4133 3y agoThe nasty bit you speak of is split brain, and it's addressed by C. C says that if you read you always get the last thing written. If the nodes can't communicate and someone does a write then the other half can't return what was written, so CAP is broken.
- thayne 3y agoWell a partition means that some nodes are unreachable, at least from the perspective of some other nodes. The tricky part is that reachability is not necessarily consistent across the entire network.