-
Notifications
You must be signed in to change notification settings - Fork 16
Description
KV 不同节点同步需要时间,适合常读少写的场景。
https://developers.cloudflare.com/workers/learning/how-kv-works/
KV achieves this performance by being eventually-consistent. Changes are usually immediately visible in the Cloudflare network edge location at which they are made but may take up to 60 seconds to be visible in other network edge locations as their cached versions of the data time out. In particular, visibility of changes takes longer in locations which have recently read a previous version of a given key (including reads that indicated the key did not exist, which are also cached locally). Workers KV is not ideal for situations where you need support for atomic operations or where values must be read and written in a single transaction.
对于限流/锁这种需要高频写/原子性操作的,看起来用 Durable Objects,但是要开付费才能用