-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Open
Labels
October 2025content:editRequest for content editsRequest for content editsdocumentationDocumentation editsDocumentation editsproduct:wafproduct:workersRelated to Workers productRelated to Workers product
Description
Existing documentation URL(s)
What changes are you suggesting?
The configuration for this binding is confusing and ambiguious.
A rate limiting binding has three settings:
namespace_id (number) - a positive integer that uniquely defines this rate limiting configuration - e.g. namespace_id = "999".
limit (number) - the limit (number of requests, number of API calls) to be applied. This is incremented when you call the limit() function in your Worker.
period (seconds) - must be 10 or 60. The period to measure increments to the limit over, in seconds.
- If
namespace_id
is a positive integer, why is it a string? Can it be an int? - The
namespace_id
description is worded as if the id just needs to be unique for the given rate limiting configuration- This would mean that a ratelimiter in 2 different
env
s of a worker could share the samenamespace_id
if they had the same config, but I'm guessing the intention is it needs to be unique per zone/account? - If it the case, it would be different from other bindings (e.g.
kv_namespaces[].id
)
- This would mean that a ratelimiter in 2 different
- There is no mention of the
simple
key, or what it means.
The Rate Limiting API is backed by the same infrastructure that serves rate limiting rules.
Does this mean that metrics for them would show up in the Cloudflare dashboard somewhere? If not, is there any way to monitor them?
Additional information
No response
Metadata
Metadata
Labels
October 2025content:editRequest for content editsRequest for content editsdocumentationDocumentation editsDocumentation editsproduct:wafproduct:workersRelated to Workers productRelated to Workers product