0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-04 10:39:43 +08:00
discourse/lib/plugin
Jake Goldsborough d948d26d25 FIX: Rate limit health check requests per backend
Load balancers health check every backend they route to, and every
backend increments the same Redis-backed per-IP counter, so health
check volume scales linearly with backend count while the per-IP
budget does not. With enough backends, health checks alone exceed the
limit and every backend gets marked down with 429s.

Key /srv/status requests on source IP plus backend hostname via a new
HealthCheck rate limiter ahead of the IP limiter. Each backend gets
its own budget, so the per-key rate stays constant regardless of
scale, and health checks remain rate limited.

Health checks from private address space skip rate limiting by
default, so most deployments see no behavior change. This matters when
load balancers check from publicly-routable addresses, such as public
IPv6 ranges. An attacker gains N x rate_limit on /srv/status across N
backends, which is not a practical concern for one of the cheapest
routes in the application.
2026-07-30 13:36:14 +00:00
..
filter.rb
filter_manager.rb
instance.rb FIX: Rate limit health check requests per backend 2026-07-30 13:36:14 +00:00
js_compiler.rb DEV: Increase plugin_manager timout, and improve error message (#38874) 2026-03-25 15:43:07 +00:00
js_manager.rb DEV: add typescript support for core, themes and plugins (#41478) 2026-07-08 12:57:18 +01:00
metadata.rb DEV: Enable Style/RedundantSelf rubocop rule (#40098) 2026-05-19 19:27:45 +02:00