Weekly news for amateur radio enthusiasts.

Tech

Readiness Probes: Traps and Better Checks

December 02, 2026

Readiness Probes: Traps and Better Checks

Readiness probes look like one of Kubernetes simpler features. A pod reports that it is ready, the Service sends it traffic; when it reports not ready, traffic is removed. Yet this small contract is easy to get subtly wrong. The result is not usually a dramatic crash. It is a slow, confusing outage where healthy pods are pulled from service, restarts multiply, and dashboards blame the wrong component.

Readiness is not a health check

Readiness answers one question: can this instance serve traffic right now? Liveness answers a different question: should Kubernetes restart this container? Startup probes cover slow boot. Mixing the three is the root of many incidents. A dependency check in a liveness probe turns a brief database wobble into a restart loop. A readiness probe that only checks that the process is alive keeps broken pods in the load balancer. Treat each probe as a separate contract and document what it is protecting. You can read more about this at thevarsityjacket.shop.

Common traps

  • Probing downstream dependencies. If every pod checks the database and the database has a short blip, every pod becomes unready at once. Traffic stops even though the application could serve cached or partial responses.
  • Reusing one endpoint for liveness and readiness. The endpoint may be fine for restart decisions but too strict for traffic. When it fails, Kubernetes both removes and restarts the pod, which is often the worst of both worlds.
  • Setting aggressive timings. Very short timeouts and low failure thresholds look responsive but produce false failures under CPU pressure. Very long initial delays keep good pods out of rotation for no reason.
  • Making probes expensive. A readiness endpoint that queries the database, refreshes a cache, or calls an authentication service adds load every few seconds per pod. At scale, the probe becomes a small denial-of-service attack on your own dependencies.
  • Using exec probes with curl or wget. These add process overhead, require the tool to exist in the image, and can fail for reasons unrelated to readiness. A simple HTTP GET is usually clearer, and native gRPC probes are better where supported.
  • Returning 200 too easily. An endpoint that only confirms the web server is listening is not a readiness check. It may keep a pod in service before migrations finish, before workers start, or after shutdown begins.
  • Ignoring shutdown. On SIGTERM, a pod should stop being ready before it stops accepting connections. If readiness stays true during termination, clients can be sent to a process that is already closing sockets.
  • Never testing the probe path. Probes are production code. If they are not exercised during deploys, dependency failures, and load tests, their behaviour is a guess.

Better checks

A good readiness check is shallow, local, and cheap. It should confirm that this instance has the state it needs to serve its normal traffic, without turning every optional dependency into a hard requirement.

  • Check local essentials: HTTP listener accepting requests, configuration loaded, worker pool initialised, required migrations complete, and any mandatory in-memory state prepared.
  • Prefer degraded service over blanket unreadiness. If an optional dependency is down, keep serving from cache or return a clear partial response. Fail readiness only when the instance cannot safely handle traffic.
  • Use a dedicated readiness endpoint with a named port and a short, predictable path. Keep authentication and heavy middleware out of it.
  • Separate startup, liveness, and readiness probes. Give slow-starting applications a startup probe with a generous failure threshold, then let readiness take over.
  • Set timings from measurements. A typical starting point is a five to ten second period, a one to three second timeout, and a failure threshold of two or three. Tune against real probe latency under load.
  • Use readiness gates sparingly. They are useful for external load balancers and custom controllers, but each gate is another thing that can keep a healthy pod out of service.

Operational habits that help

Probes need observability like any other production behaviour. Track readiness failures and probe latency separately from application errors, and alert on the number of ready replicas rather than a single failing pod. During rollout, watch whether new pods become ready for the right reason, not just quickly. During shutdown, confirm that readiness flips false before connections are closed. Review probe endpoints with the application owners and keep them small. The best readiness probe is boring: it tells the truth about one instance, costs almost nothing, and stays out of the way when the system is having a bad day.