2 ms·
So, with a global consistency window of 10s, and 1 write per second, would consistency ever be reached if a key is written to every second? What value would be
by falcolas 8y ago
So, with a global consistency window of 10s, and 1 write per second, would consistency ever be reached if a key is written to every second? What value would be visible?
One great example of why this would matter to me - could workers ever institute a coordinated rate limiting function using this KV store?
- zackbloom 8y agoOne thing to remember is you have at least two other ways of storing values. Each worker has global memory which persists between invocations (local, atomic), and you have access to the Cache API (per-data center, ephemeral). By combining those with KV to do global coordination on a more course time scale, I think you could.
- zzzcpan 8y agoRate limiting doesn't have to be coordinated to work. But you do need a PN-Counter, which they are only considering at this point.
- falcolas 8y agoA PN-Counter is a method of coordination. And if the writes were coordinated with the consistency time, that would be sufficient to implement consistent counters (or even a naive counter in a store given atomic operatons).
- zzzcpan 8y agoPN-Counter is coordination-free counter, it can't be used as a method of coordination. But it's ok for global rate limiting, as it doesn't have to guarantee exact rate at any point in time, as long as it eventually averages on specified rate.