Add a log rate limiter #25
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "log-rate-limiter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Features:
TRICOT_MAX_LOG_PER_SEC
. For exampleTRICOT_MAX_LOG_PER_SEC=10
allows up to 10 log lines per secondFurther work: governor seems to be a state of the art rate limiter for Rust. I think we could deploy it also on a per IPv4 and per-IPv6 prefix base to protect all our stacks. For example, we could allow only 10 req/sec per IP with some burst logic & so on & so forth
@ -110,1 +113,4 @@
pub warmup_cert_memory_store: bool,
/// Drops some logs to avoid overloading the server.
/// Aapplies only to info/debugt/trace logs
Aapplies -> applies
@ -111,0 +116,4 @@
/// Aapplies only to info/debugt/trace logs
/// 100 = keep all logs
/// 50 = keep roughly half the logs
/// 0 = drop all logs
the docstring seems inconsistent with what comes after (keep percentage vs quota per second)
@ -111,0 +133,4 @@
governor::state::NotKeyed,
governor::state::InMemoryState,
governor::clock::QuantaClock,
>,
is this not the same as
DefaultDirectRateLimiter
?Manually merged to main.
Pull request closed