Loading...
Loading...
Stop guessing why your deploys page on-call. Wire the endpoints, the lifespan, and the shutdown handler that let Kubernetes and load balancers route traffic correctly.
Message a mentor about fit, prerequisites, or where to start. Replies come on WhatsApp, usually within a day.
Engineers are learning here from
Ship a FastAPI service that survives a rolling deploy. Wire /healthz and /readyz, pre-warm models with a lifespan, drain in-flight requests on SIGTERM, and teach Kubernetes and Docker how to route traffic only when the pod is really ready.
Wire /healthz and /readyz, a lifespan that pre-warms models, and a SIGTERM handler that drains requests so your service survives a deploy.
What you'll ship
What you'll learn
Curriculum
The problem a health check solves
Understand what the orchestrator does with an unhealthy pod and why liveness, readiness, and startup are three different questions
The endpoints
Ship /healthz and /readyz with honest status codes and documented failure modes
Lifespan and pre-warm
Load the LLM client once with an async lifespan and gate /readyz on it
Graceful shutdown
Handle SIGTERM, drain in-flight requests, and coordinate with Kubernetes preStop and termination grace periods
End-to-end deploy
Wire Dockerfile HEALTHCHECK, run a rolling deploy, and watch the probes coordinate the transition
Who it's for
whose pods flap between Ready and CrashLoopBackOff during every deploy
whose services answer 503 for the first ten seconds after a restart because the model is still loading
tired of explaining to app teams why "it works locally" does not survive a rolling restart
FAQ
No. The endpoints work with any orchestrator or load balancer. The Kubernetes examples show you the shape, but Docker, ECS, Fly.io, and Render all use the same probe pattern.
Liveness and readiness answer different questions. /healthz answers "is the process alive?" so the orchestrator knows when to restart you. /readyz answers "are my dependencies ready?" so the load balancer knows when to send traffic. Collapsing them causes restart loops the moment a database blips.
Covered. Startup probes exist so a slow-loading model does not trigger liveness failures before the service ever starts. The course shows when you need one and when readiness alone is fine.
The endpoint patterns are generic HTTP. The lifespan and SIGTERM handling examples use FastAPI and uvicorn, but the same shape works in Flask, Starlette, or any ASGI server.
Pricing
Subscribe to Pro for every paid course, or buy just this one.
Unlock this course and every paid course plus workshop replays. One subscription.
You save 54% with regional pricing
One-time purchase. Lifetime access to every lesson, exercise, and update.
You save 41% with regional pricing
Still deciding? Ask Param a question
Production health checks with FastAPI
$29 one-time