The idea
A running process is not necessarily ready to serve traffic. Conversely, a temporary dependency problem does not always mean restarting the process will help. Distinct health signals let the platform choose between waiting, removing traffic and restarting.
Design choice
Use readiness to express whether this instance can accept its intended workload. Keep liveness focused on failures a restart can actually remedy. Give slow initialisation a startup window and avoid making every instance restart because one shared dependency is unavailable.
Worked example
A search service loads an index before becoming ready. If the index service briefly slows down later, the application reports degraded readiness for affected queries while continuing to serve cached results where valid.
Before you ship
- Name the action each probe should cause.
- Test slow startup.
- Check shared-dependency failure behaviour.
Examples are illustrative. Adapt the checks to your own environment.