cc-os/plugins/os-adr/eval-b/fixture/project/docs/adr/0004-cap-outbound-http-time...

28 lines
936 B
Markdown
Raw Normal View History

---
id: "0004"
date: 2026-03-12
status: Accepted
supersedes:
superseded-by:
affected-paths: [lib/relay/http_client.rb]
affected-components: [http]
---
# 0004 — Cap outbound HTTP timeouts at five seconds
## Context
A single hung receiver held a delivery open for two minutes with the stdlib default timeouts, blocking everything queued behind it.
## Decision
HttpClient sets open_timeout and read_timeout to five seconds. A receiver that cannot accept a small JSON POST within five seconds is treated as failed and handled by the retry policy.
## Consequences
A hung receiver costs at most ten seconds per attempt. Genuinely slow-but-healthy receivers will see more retries; none have surfaced in practice.
## Alternatives rejected
Per-endpoint configurable timeouts rejected: no current need, and it invites unbounded values creeping back in. Thirty-second timeouts rejected: still long enough to stall the queue noticeably.