Excessive memory usage when Traefik processes thousands of regex-based routing rules
0 reputation · 04 Jul 2022, 22:04 UTC
The goal is to understand whether Traefik’s internal routing tree immediately releases memory when a configuration provider removes a regex‑based route, or if the nodes persist until the Go garbage collector reclaims them.
In environments with high‑frequency updates—such as thousands of regex rules being added and removed rapidly—there is uncertainty about whether stale routing nodes accumulate, leading to measurable memory overhead, and whether any internal threshold triggers forced cleanup. Does Traefik deallocate routing tree nodes for removed regex‑based routes right away, or are they retained until the next GC cycle? Is there a configurable limit after which stale nodes are purged regardless of provider signals?