FAQ
Frequently asked questions regarding Workers KV.
Yes, you can use Workers KV outside of Workers by using the REST API or the associated Cloudflare SDKs for the REST API. It is important to note the limits of the REST API that apply.
When choosing how to access Workers KV, consider the following:
- Performance: Accessing Workers KV via the Workers Binding API is generally faster than using the REST API, as it avoids the overhead of HTTP requests.
- Rate Limits: Be aware of the different rate limits for each access method. REST API has a lower write rate limit compared to Workers Binding API. Refer to What is the rate limit of Workers KV?
Workers KV heavily caches data across the Cloudflare network. Therefore, it is possible that you read a cached value for up to the cache TTL duration.
Workers KV is eventually consistent.
Workers KV stores data in central stores and replicates the data to all Cloudflare locations through a hybrid push/pull replication approach. This means that the previous value of the key-value pair may be seen in a location for as long as the cache TTL. This means that Workers KV is eventually consistent.
Refer to How KV works.
If a Worker makes a bulk request to Workers KV, would each individual key get counted against the Worker subrequest limit (of 1000)?
No. A bulk request to Workers KV, regardless of the amount of keys included in the request, will count as a single operation. For example, you could make 500 bulk KV requests and 500 R2 requests for a total of 1000 operations.
Workers KV's rate limit differs depending on the way you access it.
Operations to Workers KV via the REST API are bound by the same limits of the REST API. This limit is shared across all Cloudflare REST API requests.
When writing to Workers KV via the Workers Binding API, the write rate limit is 1 write per second, per key, unlimited across KV keys.
When writing via Workers KV's REST API, how are writes charged?
Each key-value pair in the PUT
request is counted as a single write, identical to how each call to PUT
in the Workers API counts as a write. Writing 5,000 keys via the REST API incurs the same write costs as making 5,000 PUT
calls in a Worker.
Yes, any operations via the Cloudflare dashboard or wrangler, including updating (writing) keys, deleting keys, and listing the keys in a namespace count as billable Workers KV usage.
No.
No. Key expirations are not billable operations.
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Directory
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- © 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark