Clarify how burst limits config works in Promtail #6768
Labels
component/promtail
help wanted
We would love help on these issues. Please come help us!
type/docs
Issues related to technical documentation; the Docs Squad uses this label across many repositories
The documentation for Promtail's
readline_burst
limit is not clear enough about when bursts are allowed. It currently states the following:We use golang.org/x/time/rate under the hood. Where b is
readline_burst
and r isreadline_rate
. According to it’s documentation:In other words, the average rate will be
readline_rate
, but bursts up to a size ofreadline_burst
are allowed from time to time.The burst limit is enforced here: https://github.com/golang/time/blob/579cf78fd858857c0d766e0d63eb2b0ccf29f436/rate/rate.go#L396-L398
For example, If
readline_rate
is 100 andreadline_burst
is 200, and they send 150 items exactly once per second, then the first 150 will go through, and thereafter, they will be able to send up to 100 items per second. If they stopped sending for 2 seconds, they could send 150 in one go again and subsequent sends will be limited to 100 items per second. In any case, if the rate is abovereadline_burst
, for example 250, the 50 items over the bust size will be dropped.Note that there are other burst limits within Loki that maybe benefit from the clarification of Promtail's
readline_burst
. Here is a list:ingestion_burst_size_mb
: The documentation for this limit config is more clear than Promtail'sreadline_burst
, but there may be room for improvement.per_stream_rate_limit_burst
rate_limit_burst
The text was updated successfully, but these errors were encountered: