health-check-endpoints

Solid

Health check endpoints for liveness, readiness, dependency monitoring. Use for Kubernetes, load balancers, auto-scaling, or encountering probe failures, startup delays, dependency checks, timeout configuration errors.

API & Backend 162 stars 25 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
74
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Health Check Endpoints Implement health checks for monitoring service availability and readiness. ## Probe Types | Probe | Purpose | Failure Action | |-------|---------|----------------| | Liveness | Is process alive? | Restart container | | Readiness | Can handle traffic? | Remove from LB | | Startup | Has app started? | Delay other probes | | Deep | All deps healthy? | Trigger alerts | ## Implementation (Express) ```javascript class HealthChecker { async checkDatabase() { const start = Date.now(); try { await db.query('SELECT 1'); return { status: 'healthy', latency: Date.now() - start }; } catch (err) { return { status: 'unhealthy', error: String(err?.message || err) }; } } async checkRedis() { try { await redis.ping(); return { status: 'healthy' }; } catch (err) { return { status: 'unhealthy', error: err.message }; } } async getReadiness() { const checks = await Promise.all([ this.checkDatabase(), this.checkRedis() ]); const healthy = checks.every(c => c.status === 'healthy'); return { healthy, checks }; } } // Liveness - lightweight app.get('/health/live', (req, res) => { res.json({ status: 'ok', timestamp: new Date().toISOString() }); }); // Readiness - check dependencies app.get('/health/ready', async (req, res) => { const health = await healthChecker.getReadiness(); res.status(health.healthy ? 200 : 503).json(health); }); ``` ## Kubernetes Configur...

Details

Author
secondsky
Repository
secondsky/claude-skills
Created
6 months ago
Last Updated
2 weeks ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category