Alexey Dolotov
5dc9ba353a
Add per-user connection throttling with fair-share algorithm
When total connections exceed a configurable limit, a background
goroutine (every 5s by default) computes per-user caps using a
fair-share algorithm: small users keep their connections, remaining
budget is split equally among heavy users. New connections from
over-cap users are rejected; existing connections are not killed.
Config:
[throttle]
max-connections = 5000
check-interval = "5s"
Stats API response now includes throttle state with active caps.