Remix.run Logo
immibis 2 days ago

The protocols you mentioned are always consistent. You will know if they are not consistent because they will not make progress. Yes there's a short delay where some nodes haven't learned about the new thing yet and only know that they're about to learn the new thing, but that's not what's meant by "eventual consistency", which is when inconsistent things may happen and become consistent at some time later. In Paxos or Raft, nodes that know the new consistent data is about to arrive can wait for it and present the illusion of a completely consistent system (as long as the network isn't partitioned so the data eventually arrives). These protocols are slow. so they're usually only used for the most important coordination, like knowing which servers are online.

CAP cannot be worked around. In the event of a partition, your system is either C or A, no buts. Either the losing side of the partition refuses to process writes and usually reads as well (ensuring consistency and ensuring unavailability) or it does not refuse (ensuring availability and ensuring data corruption). There are no third options.

Well, some people say the third option is to just make sure the network is 100% reliable and a partition never occurs. That's laughable.

Yoric 2 days ago | parent | next [-]

> Yes there's a short delay where some nodes haven't learned about the new thing yet, but that's not what's meant by "eventual consistency", which is when inconsistent things may happen and become consistent at some time later.

Thanks, I haven't looked at these problems in a while.

> In the event of a partition, your system is either C or A, no buts.

Fair enough. Raft and Paxos provide well-understood tradeoffs but not a workaround.

AtlasBarfed 2 days ago | parent | prev [-]

Yes, so when I see a distributed system that does not tell me explicitly whether or not it is sacrificing consistency or availability, I get suspicious.

Or has mechanisms for tuning on a request basis what you want to prioritize: consistency or availability, and those depend on specific mechanisms for reads and writes.

If I don't see a distributed system that explains such things, then I'm assuming that they made a lot of bad assumptions.