ops: add a failure circuit breaker to webmention and SMTP outbound calls #161
Labels
No labels
kind
bug
kind
enhancement
wayfinder
grilling
wayfinder
map
wayfinder
prototype
wayfinder
research
wayfinder
task
workflow
needs-info
workflow
needs-triage
workflow
ready-for-agent
workflow
ready-for-human
workflow
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rosa/vernier#161
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during an operational-resilience review (Release It! stability rules).
Location:
crates/infra/src/jobs/webmention.rs:160(HTTP client),crates/infra/src/jobs/mailer.rs:77(send)Severity: Medium — resilience (Circuit Breaker absent)
Problem
Neither outbound dependency has a circuit breaker. When a webmention target host or the SMTP relay is persistently down, every queued job still attempts the full connect + read + backoff cycle (up to ~20 retries over as long as ~1h each). The apalis queue contains the blast radius — this never touches the request path — so the impact is bounded. But a sick dependency is hammered rather than cut off: worker capacity is spent retrying a known-dead endpoint, and healthy jobs queue behind the doomed ones.
Suggested fix
Add a per-host failure breaker that trips open after repeated failures and short-circuits at enqueue time or job start, with a probe before closing. This turns "retry the dead host 20 times" into "skip fast until it recovers," freeing workers for jobs that can succeed.