Inferensys

Glossary

Readiness Probe

A Kubernetes health check that determines if a container is ready to accept traffic, preventing requests from being routed to a model instance that is still loading weights or is otherwise unresponsive.
MLOps engineer reviewing model serving infrastructure on laptop, container orchestration visible, technical workspace.
KUBERNETES HEALTH CHECK

What is a Readiness Probe?

A readiness probe is a Kubernetes diagnostic check that determines if a container is ready to accept network traffic, preventing requests from being routed to a model instance that is still loading weights or is otherwise unresponsive.

A readiness probe is a Kubernetes mechanism that continuously assesses whether a specific container within a Pod is prepared to serve incoming requests. Unlike a liveness probe, which determines if a container should be restarted, a readiness probe controls whether the container's IP address is added to the Service endpoint. If the probe fails, the container is removed from the load balancer pool, ensuring that traffic is never routed to an instance that is initializing, loading a large model into GPU memory, or experiencing a transient failure.

For latency-optimized model serving, readiness probes are critical during the cold start phase when a large language model's weights are being transferred to the accelerator. The probe typically executes an HTTP GET request against a lightweight health endpoint or a gRPC health check, succeeding only when the model is fully loaded and the inference server is ready. This prevents the P99 latency from spiking due to requests queuing against an unready instance, directly supporting strict Service Level Objectives (SLOs) for high-throughput personalization systems.

KUBERNETES HEALTH CHECKS

Key Characteristics of Readiness Probes

Readiness probes are the gatekeepers of production traffic, ensuring that only fully initialized and healthy containers receive requests. Misconfiguring them leads to dropped connections, 502 errors, and cascading failures during rolling updates.

01

Traffic Routing Gate

The primary function of a readiness probe is to control membership in a Service's endpoint list. A container is not added to load balancer rotation until the probe succeeds. If a running container's probe fails, it is immediately removed from the pool, preventing requests from being routed to a degraded instance. This is distinct from a liveness probe, which restarts a failed container; a readiness probe simply stops sending it traffic, allowing it to recover independently.

02

Model Weight Loading

For machine learning serving, the most critical use case is blocking traffic until model weights are fully loaded into GPU or CPU memory. A large language model can take minutes to initialize. The readiness probe must check that:

  • The model file is loaded and deserialized
  • The inference engine (e.g., Triton, vLLM) has completed warm-up
  • The first dummy inference request succeeds Without this, the container will accept requests and return errors or time out.
03

Probe Configuration Parameters

Three timing parameters govern probe behavior and must be tuned to the model's loading profile:

  • initialDelaySeconds: The grace period before the first probe runs. Set this to the minimum expected model load time to avoid premature failure.
  • periodSeconds: How often the probe executes. For static readiness, a longer interval (e.g., 10s) is acceptable.
  • failureThreshold: The number of consecutive failures before the container is marked Unready. A value of 3 is common to tolerate transient blips.
04

Probe Handler Types

Kubernetes supports three mechanisms to execute a readiness check:

  • exec: Runs a command inside the container. Ideal for a Python script that calls the model's /health endpoint or checks for a marker file written after loading.
  • httpGet: Performs an HTTP GET request. The model server must expose a lightweight /v1/health/ready endpoint that returns a 200 OK only when ready.
  • tcpSocket: Checks if a TCP port is open. This is a coarse check that only verifies the process is listening, not that the model is loaded. Avoid for ML serving.
05

Startup Probe Integration

For models with extremely long initialization times, combine a readiness probe with a startup probe. The startup probe is only active during initial container startup and can have a longer failureThreshold and periodSeconds. The readiness probe is disabled until the startup probe succeeds. This prevents the container from being killed by the liveness probe during a legitimate, slow model-loading phase while still protecting against hung processes.

06

Graceful Shutdown Coordination

When a pod receives a SIGTERM during a rolling update, the readiness probe must fail immediately to drain traffic before the container terminates. The sequence is:

  1. Kubernetes marks the pod as Terminating
  2. The readiness probe fails, removing the pod from Service endpoints
  3. The pod waits for terminationGracePeriodSeconds for in-flight requests to complete
  4. The container is forcefully killed A preStop hook can explicitly fail the readiness endpoint to accelerate this drain.
KUBERNETES HEALTH CHECKS

Frequently Asked Questions

Clear, technical answers to the most common questions about implementing and debugging readiness probes in production model serving environments.

A readiness probe is a Kubernetes health check that continuously assesses whether a container is prepared to accept incoming network traffic. It works by executing a specified diagnostic—either an HTTP GET request, a TCP socket check, or an exec command—at a defined interval. The kubelet on the node runs this probe against the container. If the probe succeeds, the container's IP address is added to the Endpoints object of the associated Service, and it begins receiving traffic. If the probe fails consecutively beyond the failureThreshold, the container is removed from the Service endpoints, effectively taking it out of rotation without terminating the pod. This mechanism is critical for model serving because loading large model weights into GPU memory can take several minutes; a readiness probe prevents requests from being routed to an instance that is still initializing or has become unresponsive due to memory pressure.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.