Java Zero to All All questionsPractise free
Interview questions › Distributed Systems & Messaging › Microservice Patterns & Architecture

What's the difference between liveness and readiness checks in a service mesh / orchestrator, and why conflate them at your peril?

Level IV · SeniorMicroservice Patterns & Architecture
Short answer

Readiness answers 'can I serve traffic right now' — failing it pulls the instance out of the load-balancer pool without killing it (used during warmup, lost DB connection, or shedding load).

Explanation

Liveness answers 'is the process wedged' — failing it restarts the container. Conflating them is dangerous: if your liveness probe checks a downstream dependency, an outage in that dependency makes every replica fail liveness and get killed in a restart storm, turning a partial degradation into a total outage. Liveness should test only the process; dependency health belongs in readiness.

Common mistakes
  • Using the same endpoint for liveness and readiness.
  • Making liveness depend on downstream services, causing restart storms.

Can you say this out loud in two minutes? Drill it in a timed mock interview, with flashcards and runnable code for Microservice Patterns & Architecture.

Practise free

More on Microservice Patterns & Architecture