|
|
|
|
|
by rystsov
3384 days ago
|
|
Etcd used this scheme to provide fast reads but Aphyr demonstrated that it may lead to stale reads https://github.com/coreos/etcd/issues/741. If you can't afford stale reads then you should ask Etcd to wait for confirmation from the majority of followers before acknowledging a read with ?quorum=true. It makes Etcd do 1 round trip for reads (just like Gryadka). The same is applicable to other products (you can't relay on time in distributed systems, unless you're Google, consequently you can't relay on read leases) So there is no performance penalty. |
|
You can elect a leader for a set period of time (say, 10 seconds) and serve strong reads for a lesser period of time (5 seconds) if you have reasonable assumptions of how good your local oscillators work and avoid jumps. If you don't trust your local clock to any level of accuracy, why do you trust your local CPU?
Cockroach DB does this correctly. https://github.com/cockroachdb/cockroach/blob/master/docs/de...