Several questions about Workers-KV and DO

I have four questions about workers-kv, and one question for durable-object, I appreciate someone to help me resolve them.

  1. a question about workers-kv latency. I put some info at Tokyo, the lantency is 180ms, however the get latency at Tokyo is 320ms something. I don’t know why.

  2. As I know, workers-kv has two data centers. If I update a key in Europe, the data center in Europe will get updated immediately, and the data center in America will be updated in 60seconds. Is that correct?

  3. If I need to update the same key at almost the same time, by giving requests both in Europe and in the USA, the newer request will win. But how do KV promise that? I mean, how do KV solve timestamp diff in different continents.

  4. Workers-kv limit up to one time for writing the same key. However I see the same key can be concurrently updating at the same time in different clients. I don’t know why.

  5. Durable object has duplicates, but are the duplicates distributed globally or particularly close to the object location.

  1. Latency for cold reads is going to vary. You can improve this using
  2. No. Writes are made to both backends at more or less the same time. KV does not push writes to other edge colos. The 60 seconds you’re probably thinking of from the docs refers to the range of time it can take for cache revalidation in other colos, before which they may see stale values.
  3. Writes are ordered by millisecond timestamp plus a random nonce to reduce the likelihood of collision
  4. I’m not sure what you mean. The limit of 1 write per second to the same key is not a guarantee that writes can’t happen concurrently, it’s a warning that writing higher than that rate may result in errors being returned.
  5. Durable object replicas for a given object are distributed within a nearby region (e.g. if an object is in new york, its replicas will be in eastern north america).

Thanks for your reply. That helps! But I still have two doubts.

  1. The cold read latency at Tokyo is swing between 320ms and 180ms, but write latency is 180ms. Are there some problem with dns?
  2. How many redundant replicas does DO hold. 3 copies?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.