[Backend] Add explicit timeout and circuit check to Redis ping in /api/v1/health
Overview
The healthcheck route in backend/src/routes/health.routes.ts pings PostgreSQL and Redis. If Redis is unreachable, the Redis client ping can hang for default network timeouts (up to 10 seconds), causing container orchestrator liveness probes to fail prematurely.
Problem
- Slow or unresponsive Redis instances cause health check endpoints to stall instead of returning a fast 503 response.
Proposed Changes
- Wrap
redis.ping()in a 1,000msPromise.racetimeout helper. - Return
{ status: "degraded", redis: "timeout" }if Redis fails to respond within 1 second.
Acceptance Criteria
- [ ] Healthcheck responds within 1,000ms even if Redis is completely unresponsive.
- [ ] Correctly distinguishes between database and Redis degradation.
- [ ] Unit test added for Redis timeout simulation.
@Nuruddeen61 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
I love to work on this issue please assign me đđđ
âšī¸ Repo Maintainers: To accept this application, review their application or assign @Nuruddeen61 to this issue.
@Chinko21 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
I would like to fix this
âšī¸ Repo Maintainers: To accept this application, review their application or assign @Chinko21 to this issue.
@Nife-tanny has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
Hi I would like to work on this issue
âšī¸ Repo Maintainers: To accept this application, review their application or assign @Nife-tanny to this issue.
Congratulations, @Nife-tanny! đ Your application was accepted by the repo's maintainers, and the issue is due on September 30, 2026.
đ§âđģ @Nife-tanny: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
đ¤ Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
đ Happy Wave đ
This issue has been marked as completed by a Drips Wave moderator for @Nife-tanny as part of the Stellar Wave Program's 9th Wave đĨŗ
Moderator's reason: [Auto-assessed] The PR was successfully merged by a maintainer (mergedAt: 2026-10-09T08:19:50Z). The changes fully address Issue #1492 by adding an explicit timeout and circuit check to the health endpoint's Redis ping, wrapping it in a Promise.race timeout helper, and including robust unit tests.
đ @Nife-tanny: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here.
đ§âđģ Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.
âšī¸ Note: This issue was marked complete via moderation. Points were issued even though the GitHub issue remains open.