watchdog/internal
NotAShelf f46697bd21
internal/ratelimit: prevent time drift in TokenBucket refills
The TokenBucket ratelimiter accumulated time drift over multiple refills
because I'm an idiot. We were using 'now' as base for lastFill calc. but
this could case rate limiting to become inaccurate over time. Now we
advance lastFill by *exact* periods from previous value.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia3990b441ab6072f51dfdfa4a2511b5f6a6a6964
2026-03-02 22:38:23 +03:00
..
aggregate internal/aggregate: make shutdown context-aware proper goroutine sync 2026-03-02 22:38:21 +03:00
api interal/api: replace liner array scan with hashmap lookup in domain validation 2026-03-02 22:38:22 +03:00
config internal/aggergate: make HLL state path configurable 2026-03-02 22:38:19 +03:00
limits internal: centralize size/length constants; better DoS protection 2026-03-02 22:38:00 +03:00
normalize internal: fix the tests broken by hardening 2026-03-02 22:38:07 +03:00
ratelimit internal/ratelimit: prevent time drift in TokenBucket refills 2026-03-02 22:38:23 +03:00