Site Reliability Engineering interview question · Most asked

What is the difference between liveness, readiness and startup probes in Kubernetes?

Summary

A readiness probe decides whether a pod receives traffic; a failing pod is removed from the Service endpoints. A liveness probe decides whether the container should be restarted. A startup probe protects slow-starting containers by disabling the other probes until startup succeeds.

Longer Answer

The classic mistake: a liveness probe that checks dependencies (database reachable). When the database blips, every pod fails liveness and restarts at the same time, turning a dependency problem into a full outage and a restart storm. Liveness should check only that the process itself is not stuck; readiness can reflect whether the instance can serve (warm-up done, not overloaded). Use generous thresholds and timeouts, and set up graceful shutdown (stop accepting, drain, then exit on SIGTERM) along with preStop hooks where load balancers are slow to deregister.

Key Points

  • Readiness: receive traffic or not.
  • Liveness: restart or not.
  • Startup: protect slow starts.
  • Never check dependencies in liveness.

More most-asked Site Reliability Engineering questions

← All Site Reliability Engineering questions