Replication lag?

Does KV or R2 for workers have replication lag? It seems like when I have an image uploaded, then requested right away it can't be found. Does it take time for replication between regions?
1 Reply
Chaika
Chaika4mo ago
KV is eventually consistency and does have cache yes, default 60 seconds and can only be made higher not lower: https://developers.cloudflare.com/kv/concepts/how-kv-works/. After uploading/updating a key pair it could take up to your cache ttl to see it in all locations R2 is strongly consistent by default unless you are manually using the cache api or are using an r2 custom domain w/ caching: https://developers.cloudflare.com/r2/reference/consistency/
Strongly consistent: readers will immediately see the latest object globally
R2 also does not replicate between regions, your bucket & all its objects are only ever in one region
Want results from more Discord servers?
Add your server