Rate Limit Reset
Sets one rate limit counter back to zero, such as the monthly quota of a single tenant. Useful for granting a customer more requests after a mistake or a support request.
| This writes to the store configured under ratelimit directly, so it works against a running deployment. It only connects to the datastore the store uses, not to any providers or caches. It can’t be used with the memory store since those counters only exist inside the server process. |
Usage
Full, up-to-date usage information can be found with tilegroxy ratelimit reset -h.
tilegroxy ratelimit reset -hSets the counter of one rate limit rule back to zero. For a rolling
period this clears both the current and previous bucket.
Give the rule by name, such as premium.tenant.month, which
'ratelimit list' shows. Every segment of the rule must be supplied with
its flag, and only those. Pass an empty value, such as --user "", to
reset the counter shared by requests without one. --layer takes the
layer's ID, not the name from the URL.
Usage:
tilegroxy ratelimit reset <rule> [flags]
Rule names are described under Rate Limiting. Use ratelimit list to find them and ratelimit status to see which rule is blocking a request.
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
|
bool |
|
Show the counter that would be reset without changing it |
|
bool |
|
help for reset |
|
string |
The client IP address of the counter. Required when the rule is segmented by ip |
|
|
bool |
|
Output in JSON |
|
string |
The layer ID of the counter. Required when the rule is segmented by layer |
|
|
string |
The tenant ID of the counter. Required when the rule is segmented by tenant |
|
|
string |
The user ID of the counter. Required when the rule is segmented by user |
Example
Using the policies from the Rate Limiting example:
tilegroxy ratelimit reset premium.tenant.month -c tilegroxy.yml --tenant acme --dry-run
tilegroxy ratelimit reset premium.tenant.month -c tilegroxy.yml --tenant acme
The second command produces an output like:
Reset premium.tenant.month for tenant="acme", which had 100000 used
Adding --user alice to either command is an error, since premium.tenant.month isn’t segmented by user.