4 ms·
We should really push CAP consistency concerns to the client. Let's say transactions are committed to a distributed log (ala raft), then the log position can b
by pyrolistical 4y ago
We should really push CAP consistency concerns to the client.
Let's say transactions are committed to a distributed log (ala raft), then the log position can be the transaction id.
Passing the transaction id back to the client will then allow it to choose its own level of consistency by:
1. Pick consistency over latency: Make read request with transactions id to a random node, and the node wait until it has caught up that point in the distribute log before responding
2. Pick latency over consistency: Make read request for whatever is latest data on random node
Note how this is a departure from how raft services client reads. In raft land only the primary is allowed to service reads as it waits for other consensus tick to ensure it is still the leader before responding. While this guarantees consistency, it hurts scalability as you now have a single bottleneck serving all clients for BOTH read/writes.
- jakewins 4y agoThis is how Neo4j clustering works, FWIW. Client gets a “bookmark” - basically an index into the RAFT log - and can opt to include that when querying secondaries, who will block. I imagine variations of this are quite common, vector clocks as distributed barriers.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- anonymousDan 4y agoWhat if you have different clients wanting different levels of consistency for transactions spanning the same data?
- deepsun 4y agoAs far as I understand -- that's ok, i.e. different clients will get what they're asking for.