Dashboard

Learn faster. Build smarter.

Back to Comparisons
Containers

Readiness Probe vs Liveness Probe

Compare traffic eligibility checks with health checks that trigger container restarts in Kubernetes.

Containers

Readiness Probe

A readiness probe determines whether a pod is ready to receive traffic. It controls whether Kubernetes includes the pod behind Services and load balancing.

Containers

Liveness Probe

A liveness probe determines whether a container is still healthy enough to keep running. If it fails, Kubernetes may restart the container.

Key Differences

Readiness controls whether a pod should receive traffic, while liveness controls whether a container should be restarted.

A pod can be alive but not ready, which means it is running but not yet safe to serve requests.

Readiness probes are useful for startup warm-up, dependency readiness, and temporary service unavailability.

Liveness probes are useful when applications can hang, deadlock, or become unhealthy in a way that requires restart.

Misconfigured liveness probes can cause restart loops, while misconfigured readiness probes can block healthy traffic.

They serve different purposes and should not be treated as interchangeable health checks.

When to Use

When to use Readiness Probe

Use readiness probes when your application needs warm-up time, depends on external services, or sometimes should stop receiving traffic without being restarted.

When to use Liveness Probe

Use liveness probes when your application can get stuck internally and should be restarted automatically to recover.

Tradeoffs

Readiness improves traffic safety, but can hide pods from service if configured too aggressively.

Liveness improves auto-recovery, but poor settings can create instability and unnecessary restarts.

Well-designed systems often use both, but each must be configured for a specific purpose.

Common Mistakes

Using liveness when readiness is the real need.

Creating liveness probes that restart apps before they have enough time to start.

Assuming one probe is enough for all application health scenarios.

Interview Tip

The classic short answer is: readiness controls traffic, liveness controls restarts.