Rate Limits
A rate limit is a strategy for limiting the usage of a shared resource across parallel components in a Wombat instance, or potentially across multiple instances. They are configured as a resource:
And most components that hit external services have a field rate_limit
for specifying a rate limit resource to use,
identified by the label
field. For example, if we wanted to use our foobar
rate limit with an
http_client
input it would look like this:
By using a rate limit in this way we can guarantee that our input will only poll our HTTP source at the rate of 500 requests per second.
Some components don’t have a rate_limit
field but we might still wish to throttle them by a rate limit, in which case
we can use the rate_limit
processor that applies back pressure to a
processing pipeline when the limit is reached. For example, if we wished to limit the consumption of lines of a
csv
input to a specified rate limit we can do that with the following:
Metrics
The following metrics are exposed for a rate limit:
rate_limit_checked
: A count of the number of times the rate limit has been probed.rate_limit_triggered
: A count of the number of times the rate limit has been triggered by a probe.rate_limit_error
: A count of the number of times the rate limit has errored when probed.