Skip to content
Latchkey

What Is a Readiness Probe? Explained

A readiness probe checks whether an instance is ready to receive traffic, so requests are sent to it only after it has finished starting up.

Starting is not the same as ready. A service can be running while it is still loading config, warming caches, or establishing connections. A readiness probe captures that distinction so the platform, and your CI jobs, wait for "ready" rather than merely "started", which is a frequent source of races.

What "ready" means

A readiness probe answers a narrow question: can this instance serve requests right now? Until it passes, the instance exists but should not receive traffic. Once it passes, it is wired into the pool. This is how rolling deploys avoid sending requests to instances that are not yet warmed up.

Readiness vs liveness

A liveness probe asks whether a process is alive or hung (failing it triggers a restart). A readiness probe asks whether it can serve (failing it removes it from rotation but does not restart it). Mixing them up causes either needless restarts or traffic to unready instances.

Why CI cares

A classic flaky failure is a test that runs before its database or service is ready. The container reports "started", the test fires, and it fails because the dependency was not actually serving yet. Waiting on a readiness condition, not just a started one, removes that race entirely.

Implementing it well

  • Check a real serving path (a query, a ping endpoint), not just that a port is open.
  • In CI, gate dependent steps on the readiness condition before running tests.
  • Allow enough startup time so a slow-but-fine start is not treated as failure.

The Latchkey angle

Readiness probes are a job-design tool that reduces races; self-healing handles the residue. When a transient startup hiccup still trips a job, Latchkey self-healing managed runners automatically retry so a one-off blip does not fail your build.

Key takeaways

  • A readiness probe checks whether an instance can serve traffic yet.
  • Started is not ready; the gap is a common source of races.
  • Readiness removes from rotation; liveness restarts, do not confuse them.
  • Gating CI steps on readiness prevents race-condition flakiness.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →