HN Gopher Feed (2017-12-05) - page 1 of 10 ___________________________________________________________________
"Follow-The-Workload" Beats the Latency-Survivability Tradeoff in
CockroachDB
30 points by awoods187
https://www.cockroachlabs.com/blog/follow-the-workload/___________________________________________________________________
adrianratnapala - 42 minutes ago
So is this for helping with read, but not write latency?I know
little about CockroachDB, but I vaguely remember that it has
consistent replication. If so, then writes would require some
round trips before consensus is reached, killing any latency
benefits from having the master follow the load (unless you move
all your replicas around!).
a-robinson - 29 minutes ago
It helps with both, but is more dramatic for reads.Reads go from
1 RTT to 0 RTTs, while writes go from 2 RTTs to 1 RTT. For
example, consider a cluster in which the nodes are 200ms RTT away
from each other.* A read will take 200ms if the leaseholder isn't
in the local datacenter vs single-digit milliseconds if it is
local.* A write will take 400ms if the leaseholder isn't in the
local datacenter vs 200 milliseconds if it is local.The write
takes 400ms because it takes 100ms to get from the local
datacenter to leaseholder, 200ms to reach consensus (the
leaseholder needs to send a request to and get a response from
one of the followers), and another 100ms for the response from
the leaseholder to get back to the local datacenter where the
request originated.
ericand - 1 hours ago
For reference, this is part 2 of a two part series. Here is part 1:
https://www.cockroachlabs.com/blog/tunable-controls-for-late...