fail fast pattern
If you already know a request is going to fail, reject it immediately rather than letting it consume resources working toward inevitable failure. Fast 503s are kinder than slow timeouts — for the user, the caller, and the system.
If you already know a request is going to fail, reject it immediately rather than letting it consume resources working toward inevitable failure. Fast 503s are kinder than slow timeouts — for the user, the caller, and the system.
symptoms
- requests timing out at the upper bound instead of failing quickly
- wasted CPU/IO on doomed work
- queues filling with work that will fail anyway
causes
- no precondition checks at the edge
- circuit breakers not deployed
- optimism about partial-failure recovery
fixes
- validate inputs aggressively at the edge
- circuit breakers for known-bad downstreams
- admission control with pre-flight checks
- return 503 with Retry-After when overloaded
you might say
- fail-fast
- short-circuit it
- just say no early