Rate Limit Reset
Sets one rate limit counter back to zero, such as a tenant's monthly quota. Useful for granting 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 |
Global flags
The following global flags are available for supplying your configuration:
-c, --config string A file path to the configuration file to use.
The file should have an extension of either
json or yml/yaml and be readable.
(default "./tilegroxy.yml")
--remote-endpoint string The endpoint to use to connect to the remote
provider (default "http://127.0.0.1:2379")
--remote-path string The path to use to select the configuration
on the remote provider
(default "/config/tilegroxy.yml")
--remote-provider string The provider to pull configuration from.
One of: etcd, etcd3, consul, firestore, nats
--remote-type string The file format to use to parse the configuration
from the remote provider (default "yaml")
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.