rproxy: circuit breaker for asks to waf (closes #392)
check / check (push) Failing after 3m53s

Five asks that get no answer in time within five seconds open the
breaker. While open, a request takes
SWW_RPROXY_WAF_BACKEND_NO_ANSWER_DISPOSITION without asking waf, except
one ask a second; the first answer closes it. Slow answers count as
failures. SPEC.md describes it.

The sww test that stops and restarts waf now waits for the breaker to
close before it expects the ban again.

Model: opus-5-5
This commit is contained in:
sneak committed 2026-11-15 14:39:56 +00:00
1 parent 8efd6339a6
commit e31935b743
11 files changed
+464 -25

No files matched your search

+1 -1
View File
@@ -238,7 +238,7 @@ meanings where they differ:
- `disposition`: what was done with the request: `allow`, `deny` or `close`. It
is `waf`'s answer, or the value of
`SWW_RPROXY_WAF_BACKEND_NO_ANSWER_DISPOSITION`. It is left out when:
- `waf` was not asked, as for the health check;
- `rproxy` answered the request itself, as for the health check;
- the visitor went away while `waf` was being asked;
- `waf`'s answer had no valid `X-Sww-Disposition`;
- `rproxy` could not pass on `waf`'s answer, and answered `502`.