Problem
Current health check only verifies Postgres connectivity. Redis and Kafka status are unknown. No latency information — a 10-second database response still shows "healthy."
Proposed solution
Enhance GET /health to report all dependencies:
{
"status": "ok",
"dependencies": {
"postgres": { "status": "up", "latencyMs": 2 },
"redis": { "status": "up", "latencyMs": 1 },
"kafka": { "status": "up", "latencyMs": 5 }
},
"uptime": 86400,
"version": "0.6.0"
}
Each dependency check: ping/NOOP command, measure round-trip, timeout at 5 seconds.
Alternatives considered
- Separate liveness and readiness probes — future enhancement for Kubernetes. Start with unified
/health.
Additional context
Uses @nestjs/terminus which is already installed. Add Redis and Kafka health indicators.
Problem
Current health check only verifies Postgres connectivity. Redis and Kafka status are unknown. No latency information — a 10-second database response still shows "healthy."
Proposed solution
Enhance
GET /healthto report all dependencies:{ "status": "ok", "dependencies": { "postgres": { "status": "up", "latencyMs": 2 }, "redis": { "status": "up", "latencyMs": 1 }, "kafka": { "status": "up", "latencyMs": 5 } }, "uptime": 86400, "version": "0.6.0" }Each dependency check: ping/NOOP command, measure round-trip, timeout at 5 seconds.
Alternatives considered
/health.Additional context
Uses
@nestjs/terminuswhich is already installed. Add Redis and Kafka health indicators.