Repository navigation
feat: add provider circuit breakers, graceful shutdown, health probes, and outbound retries - #1825
Merged
github-actions[bot] merged 1 commit intoOct 17, 2026
Conversation
- Breaker per provider with fallbacks (Smartdevs17#1793) - Graceful shutdown with connection draining (Smartdevs17#1792) - Distinct liveness and readiness health probes (Smartdevs17#1795) - Outbound request timeouts and idempotent retries (Smartdevs17#1794)
|
@Omoboi-dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
This pull request addresses issues #1792, #1793, #1794, and #1795 by introducing provider circuit breaking, graceful shutdown with connection draining, distinct liveness/readiness probes, and bounded outbound timeouts with idempotent retries.
#1793: Add circuit breakers for provider calls
ProviderCircuitBreakerRegistrymanaging isolated circuit breaker instances per external provider (stripe,paddle,circle,stellar, etc.) to prevent cascading outages.#1792: Add graceful shutdown
inFlightRequests). On shutdown, stops accepting new requests (returning 503 while draining), closes idle keep-alive connections, and waits for active requests to finish up todrainTimeoutMs(default 10,000ms).SIGTERMandSIGINTsignals with clean event handler cleanup.#1795: Add health and readiness probes
/health/liveand/livez: Liveness probe returning200 OKwith uptime./health/readyand/readyz: Readiness probe evaluating critical dependencies (database querySELECT 1and cacheisHealthy()). Returns503 Service Unavailableif database/cache is down or if the server is in draining state./healthendpoint for existing monitors.#1794: Add outbound request timeouts and retries
outboundRequestwrappingfetchwithAbortController(default 5,000ms timeout) that throwsOutboundTimeoutError.GET,PUT,DELETE,HEAD,OPTIONS) or requests carrying anIdempotency-Key/X-Idempotency-Keyheader with linear backoff. Restricts non-idempotentPOSTcalls without idempotency keys to a single attempt.Closes #1792
Closes #1793
Closes #1794
Closes #1795