diff --git a/source/river/src/proxy/rate_limiting/multi.rs b/source/river/src/proxy/rate_limiting/multi.rs index 3886ab1..247bd99 100644 --- a/source/river/src/proxy/rate_limiting/multi.rs +++ b/source/river/src/proxy/rate_limiting/multi.rs @@ -166,7 +166,7 @@ where { /// Create a new rate limiter with the given configuration. /// - /// See [`RaterConfig`] for configuration options. + /// See [`MultiRaterConfig`] for configuration options. pub fn new(config: MultiRaterConfig) -> Self { let MultiRaterConfig { threads, diff --git a/source/river/src/proxy/rate_limiting/single.rs b/source/river/src/proxy/rate_limiting/single.rs index 2d23d47..42d968e 100644 --- a/source/river/src/proxy/rate_limiting/single.rs +++ b/source/river/src/proxy/rate_limiting/single.rs @@ -31,7 +31,7 @@ pub struct SingleInstance { impl SingleInstance { /// Create a new rate limiter with the given configuration. /// - /// See [`RaterConfig`] for configuration options. + /// See [`SingleInstanceConfig`] for configuration options. pub fn new(config: SingleInstanceConfig, kind: SingleRequestKeyKind) -> Self { let SingleInstanceConfig { max_tokens_per_bucket, diff --git a/user-manual/src/config/kdl.md b/user-manual/src/config/kdl.md index a923632..8c34872 100644 --- a/user-manual/src/config/kdl.md +++ b/user-manual/src/config/kdl.md @@ -98,13 +98,14 @@ services { } } rate-limiting { - timeout millis=100 - rule kind="source-ip" \ max-buckets=4000 tokens-per-bucket=10 refill-qty=1 refill-rate-ms=10 - rule kind="uri" pattern="static/.*" \ + rule kind="specific-uri" pattern="static/.*" \ max-buckets=2000 tokens-per-bucket=20 refill-qty=5 refill-rate-ms=1 + + rule kind="any-matching-uri" pattern=r".*\.mp4" \ + tokens-per-bucket=50 refill-qty=2 refill-rate-ms=3 } } Example3 {