Repository navigation
fix(routes): separate liveness and readiness health checks with cached Soroban RPC probing - #75
Merged
joelpeace48-cell merged 1 commit intoAug 27, 2026
Conversation
…d Soroban RPC probing
Contributor
|
@xeseing, don't create PR when not assigned issues |
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.
What this changes?
Separates health checking into
/health/live(process liveness) and/health/ready(dependency and shutdown readiness) endpoints, while maintaining/healthfor backward compatibility. Probes Soroban RPC health with a 3-second timeout and a 5-second TTL cache, returning503 Service Unavailablewith per-dependency breakdown if unhealthy or shutting down.Closes #36
Why
The original
/healthroute returned unconditional success, reporting healthy even when Soroban RPC was unreachable or during process shutdown. This could cause load balancers and orchestrators to route traffic to instances incapable of serving requests.How it was verified
Executed
npm run lint(tsc --noEmit) with 0 errors.Executed
npm run build(tsc) with 0 errors.Executed unit test suite (
npm test) covering liveness, readiness happy path, RPC caching within TTL, 503 on RPC failure/timeout, and 503 during graceful shutdown (63/63 tests passing).Existing tests pass
New tests cover the change
No change to a public contract interface, or a migration note is included
Risk
Low. No changes to contract interfaces, stored state, or transaction signing. Only adds health endpoints (
/health/live,/health/ready) and preserves existing/healthbehavior.