{"canonical_url":"https://engineer.company/glossary/readiness-probe/","content_markdown":"# Readiness probe\n\n## What it is\n\nA readiness probe checks whether a running application instance should receive\ntraffic. In Kubernetes, the kubelet runs the configured probe against a\ncontainer. A failed readiness probe marks that container unready. The Pod's\nreadiness can then affect whether matching Services use it as a ready endpoint.\nThe process can remain running while the platform stops directing ordinary\nrequests to it.\n\nThe probe can make an HTTP request, try to open a socket, use a gRPC health\ncheck, or run a command according to the configuration. A simple socket test\nanswers whether a listener can accept a connection. An application-level check\ncan answer a more specific question, such as whether the service loaded its\nconfiguration and can respond to the traffic that instance will receive. Choose\nan observable condition with a useful relationship to the actual request path.\n\nReadiness can change throughout a Pod's lifetime. An application may come up,\nprepare its local state and become ready, then temporarily become unready while\nit recovers from a failure. Kubernetes also has liveness probes, which can lead\nto restarts after failure, and startup probes, which can give a slow startup\ntime before other probes run. Those controls take different actions. Give each a\nclear reason for its result and review their timing together.\n\n## Why it matters\n\nA server may bind its port before it can answer useful requests. It could still\nbe loading a routing table, opening a local data store or checking that its\nconfiguration is usable. Directing traffic to the server at that point can turn\nan ordinary deployment into a wave of failures. A readiness condition lets the\napplication explain when it can take requests while deployment and networking\ncontinue independently.\n\nReadiness also helps with partial failures. Consider three instances of a\nservice. One loses access to a resource needed for its main requests while the\nother instances continue. A local readiness signal can steer new requests toward\nthe instances that can still serve them. The user-facing benefit comes from\ndetecting the failure promptly and preserving enough capacity elsewhere. Both\nthe timing and the availability of those other instances belong in the design.\n\nShared dependencies need a deliberate policy. If every instance checks an\noptional service and withdraws whenever that service is slow, a small outage can\nremove the whole application from routing. Decide which requests remain\nmeaningful with a fallback, and which must fail closed when a critical\ndependency is missing. The probe itself should be bounded and cheap enough to\nrun regularly under load. Measure the result the platform observes as well as\nthe result returned by the probe.\n\n## What it looks like in practice\n\nImagine an API with a startup phase that prepares an in-memory index. Its normal\nhealth endpoint can prove that the process responds. Its readiness endpoint can\nreport success once the instance can serve the index-backed request. A\nreplacement Pod starts with readiness false, prepares the index, and then\nbecomes eligible for traffic. A rollout test can verify the order by following\nthe Pod status, the Service endpoints and a request that actually queries the\nindex.\n\nTest failure as well as startup. Force one instance to lose the resource it\nchecks, confirm the endpoint becomes unready and watch which instance receives\nthe next request. Keep a client connected during the change. A readiness\ntransition affects how traffic is selected, yet existing connections and other\nload balancers have their own timing. Observe them explicitly. On shutdown, stop\naccepting new work and give in-progress requests a bounded chance to finish\nbefore the process exits.\n\nEngineer's\n[Azure platform deployment case study](/portfolio/owned-end-to-end-platform-deployments-to-azure/)\ndocuments promoting the same artefact through development, staging and\nproduction with environment-specific settings. That discipline matters when\ntuning an admission check. An illustrative service can exercise the same health\ncondition in staging and production and supply its real dependencies through\nconfiguration. The release check should confirm that the instance becomes ready\nfor the expected reason in each environment.\n\n## Where it goes wrong\n\nA readiness endpoint that returns success whenever the process can answer it can\ngive a false sense of availability. Put the minimum required state into the\nsignal. Keep the response designed for operators, and avoid expensive work or\nsensitive dependency details. A failed probe should be traceable from the Pod\ncondition to a useful application log, so the team can tell whether to wait or\nrepair configuration.\n\nTimeouts and thresholds can work against the desired outcome. If a first failure\nmay be transient, consecutive observations can reduce flapping. A long period\nbefore noticing repeated failure can send traffic to an instance that has\nalready stopped serving correctly. Model recovery and failure separately. Test\nthe observed time from a degraded dependency to endpoint withdrawal, and from\nrecovery to a useful successful request. Calculate the total time using the\nplatform's actual scheduling and retry settings.\n\nTest delivery of the status at the actual boundary too. An orchestrator can\nobserve a local probe result before another traffic component has applied the\ncorresponding endpoint update. A connection reused by a client can survive\nseveral rounds of endpoint changes. Correlate the probe timestamp with the first\nreal request that moves away from the instance. This measurement gives a release\nan observed response time for admission changes, which is more useful than\nadding up timers from separate configuration files.\n\nLastly, separate service admission from capacity guarantees. A green ready count\ndescribes how many instances pass the configured probe. A useful load test\nchecks how much work they can sustain, which requests succeed and how responses\nchange as one instance leaves. Keep an operator's procedure for checking real\nendpoints during a rollout, especially where more than one traffic layer is\ninvolved. The probe is most valuable when its result explains a measured change\nin the service a client receives.\n\n## Further reading\n\n- [Kubernetes container probes](https://kubernetes.io/docs/concepts/workloads/pods/probes/).\n  Explains when readiness fails and how probe types affect a container.\n- [Configuring liveness, readiness and startup probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/).\n  Gives concrete Kubernetes configuration examples.\n- [Kubernetes EndpointSlices](https://kubernetes.io/docs/concepts/services-networking/endpoint-slices/).\n  Describes the endpoint conditions exposed to Service consumers.\n\n\u003chttps://engineer.company/glossary/readiness-probe/\u003e\n","date_modified":"2026-11-25T07:18:46Z","description":"Trace how Kubernetes readiness affects traffic and exercise a workload through startup, failure and recovery.","formats":{"gemtext":"https://engineer.company/glossary/readiness-probe/index.gmi","gopher":"https://engineer.company/glossary/readiness-probe/gophermap","html":"https://engineer.company/glossary/readiness-probe/","json":"https://engineer.company/glossary/readiness-probe/index.json","markdown":"https://engineer.company/glossary/readiness-probe/index.md","pdf":"https://engineer.company/glossary/readiness-probe/index.pdf"},"kind":"page","language":"en","title":"What is a readiness probe?","url":"https://engineer.company/glossary/readiness-probe/","version":1}