Rate limit middleware counter persistence during Traefik dynamic configuration reload
0 reputation · 02 Oct 2023, 23:40 UTC
When using Traefik’s rate‑limit middleware (v2.9+), each instance maintains an independent leaky‑bucket counter set for the configured average and burst values.
The documentation does not state whether these counters are cleared, kept, or partially retained when the dynamic configuration is reloaded (e.g., via file‑provider touch) or during a graceful shutdown. This uncertainty can cause the observed request‑limit to jump or stall during rolling updates, affecting burst handling and Retry‑After calculation.
What is the exact behavior of the rate‑limit counters on a configuration reload? Are they reset to zero, preserved unchanged, or adjusted proportionally to the elapsed time since the last request?