Build a health-probe & rollout controller
Separate process liveness from readiness, enforce SLO burn rates, coordinate graceful draining, and defend rollout gates.
Your brief
Build the reliability control plane for a microservice: expose accurate liveness and readiness probes, track request-based error budgets, drain active requests on shutdown, gate canary rollouts, and sanitize diagnostic logs.
Node.js 22.12+ and basic HTTP/async JS familiarity. Review devops foundations whenever a concept is unfamiliar.
This local lab models probes, SLO math, and HTTP draining in process memory on 127.0.0.1:3213. Production clusters add orchestrator probe timing, distributed telemetry storage, and load-balancer propagation delays.
Download starter.mjs and checks.mjs into one folder. Run node checks.mjs ./starter.mjs 1 through 6 as you implement each step, then start node starter.mjs on port 3213.
0 / 6 steps verified by you. Checks are self-reported; this website does not execute your code.
- 1
Separate liveness from readiness probes
Prevent dependency blips from triggering cascading pod restarts.
- 2
Compute request-based SLI and error budget burn
Measure user-visible availability rather than process uptime.
- 3
Coordinate graceful request draining
Finish in-flight requests within a bounded termination grace window.
- 4
Enforce canary compatibility and rollout gates
Halt or roll back releases when schema compatibility or SLO metrics fail.
- 5
Sanitize logs and route actionable alerts
Scrub credentials before emitting logs and separate pages from tickets.
- 6
Wire the HTTP probe server and defend the design
Exercise live HTTP endpoints for dependency loss, draining, and metrics.