Quick revision
The short answer
The standard says liveness uses /actuator/health/liveness and checks only the application's internal state, never databases or downstream services; readiness uses /actuator/health/readiness and may include only dependencies whose loss means this pod cannot serve any request; and slow starters use a startup probe instead of a long initial delay. Default periods, timeouts and failure thresholds live in the platform templates with documented overrides, probes can be served on a separate management port or path so application load does not block them, and game days test that they behave as designed.
What to remember
In this answer, we defined a probe standard for Spring Boot services on Kubernetes. Liveness uses /actuator/health/liveness and checks only internal state, readiness uses /actuator/health/readiness and includes only dependencies whose loss makes the pod useless, slow starters use a startup probe instead of a long initial delay, default periods, timeouts and thresholds come from platform templates with documented overrides, probes are served on a deliberately chosen port so load does not block them, and game days plus a pipeline lint keep the standard honest.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
The standard says liveness uses /actuator/health/liveness and checks only the application's internal state, never databases or downstream services; readiness uses /actuator/health/readiness and may include only dependencies whose loss means this pod cannot serve any request; and slow starters use a startup probe instead of a long initial delay. Default periods, timeouts and failure thresholds live in the platform templates with documented overrides, probes can be served on a separate management port or path so application load does not block them, and game days test that they behave as designed.
Why this question is asked
When every team writes its own probes, the platform inherits every mistake: liveness on /actuator/health that restarts pods during a database outage, one-second timeouts that kill JVMs during GC pauses, and initial delays that are either too short or waste a minute on every rollout. A platform standard removes these failures for all services at once. Interviewers ask this to see whether we can turn probe knowledge into clear rules with good defaults. In this answer, we will write the rules for each probe, choose default timings with the reasoning behind them, decide where probes are served, and plan how to verify the standard.
1Rule 1: Liveness Checks Only Internal State
Liveness exists to restart a process that is stuck and cannot recover. So the standard is strict: the liveness probe is /actuator/health/liveness, and the liveness group contains only the livenessState indicator. No database, no message broker, no downstream HTTP service, no disk check. A service that has an internal failure only a restart can fix, such as a dead critical thread, reports it by publishing LivenessState.BROKEN.
The reason for being strict is the failure mode. A dependency in liveness turns any outage of that dependency into a restart storm across every service that uses it, which spreads the outage and slows recovery. There is no case where restarting our pod fixes someone else's database.
2Rule 2: Readiness Includes Only Dependencies That Make the Pod Useless
Readiness controls traffic, so the question for each dependency is: if this is unavailable, can this pod serve any request at all, and would removing it from rotation help? A per-pod dependency, such as a local sidecar or a cache warming at startup, often qualifies. A shared database usually does not, because if it fails, every pod fails readiness together, the Service has no endpoints, and clients get connection errors instead of a clear response.
The standard therefore keeps the readiness group at readinessState by default. A team adds a dependency with management.endpoint.health.group.readiness.include and a short note in the service's documentation explaining why its loss makes the pod useless.
| Check | Liveness | Readiness |
|---|---|---|
| Application availability state | yes (livenessState) | yes (readinessState) |
| Shared database or broker | never | rarely; only with a documented reason |
| Per-pod dependency (sidecar, local cache) | never | allowed if pod cannot serve without it |
| Downstream HTTP services | never | no; use circuit breakers instead |
| Startup work (cache warm-up) | no | yes, via runners before ACCEPTING_TRAFFIC |
3Rule 3: Startup Probes Instead of Long Initial Delays
Spring Boot services vary from 3 seconds to more than a minute of startup, and a cold start on a busy node can take twice as long as on a laptop. An initialDelaySeconds on liveness has to cover the worst case for every start, so it wastes time on fast starts and still fails on unusually slow ones. A startup probe solves both: it polls frequently, ends as soon as the application is up, and only gives up after a generous budget. The standard requires a startup probe for every service, on the liveness path, and no initial delay on liveness or readiness.
4Default Timings in the Platform Templates
The defaults live in the shared Helm chart or deployment template, so services get them without writing anything. Each number has a reason: the startup budget covers slow cold starts, liveness tolerates a long GC pause or a brief overload without restarting, and readiness reacts quickly so traffic moves away from a struggling pod.
- Container startsstartup probe every 5 s, others paused
- Liveness path UP within 180 s?YesHand over to liveness and readinessNoRestart the container
- Readiness UP after runners finishpod added to Service endpoints
- Shutdown beginsreadiness
REFUSING_TRAFFIC, pod leaves endpoints - Liveness keeps passing while requests drain
5 steps in order. Play them, or step through them one at a time.
Liveness only restarts a process that is stuck, never one that is waiting.
Overrides are allowed through template values, for example a longer startup budget for a service that loads a large model, but each override is recorded with a reason. The platform can then list all overrides and see whether a default should change.
5Where Probes Are Served
Probes should not queue behind application traffic. If all Tomcat threads are busy with slow requests, a probe on the same connector may time out, and a busy pod gets restarted exactly when it is most loaded. Serving Actuator on a separate management port, with management.server.port=8081, gives probes their own small server and thread pool.
But there is a catch, which Spring Boot's documentation points out: if the main server is broken while the management server is fine, probes on the management port still pass. The platform can choose either default, but should do it deliberately. One balanced option is the management port for liveness, which should not fail under load, and the main port for readiness, using management.endpoint.health.probes.add-additional-paths=true to expose /readyz on the main server, so readiness reflects whether the server that handles traffic can respond.
6Verify With Game Days
A standard is only as good as its behaviour in a real failure. So the platform runs game days in a staging environment: block the database and confirm that no pod restarts, saturate a service and confirm that it leaves rotation but is not killed, slow down startup and confirm the startup probe budget is enough, and deploy and confirm readiness drops before shutdown. A lint check in the deployment pipeline also rejects liveness probes pointing at /actuator/health or at any group that includes external indicators.
7Follow-up questions
Why not just let each team choose its own probes?
Because the failures are platform-wide. A restart storm in one popular service affects every caller, and the mistakes repeat across teams. Good defaults let most teams write nothing, while documented overrides keep room for real differences.
What if a service has no Actuator?
The standard still applies through a lightweight endpoint with the same meaning: a liveness endpoint that reflects only internal state and a readiness endpoint that reflects whether the process can take traffic. For Spring Boot services, Actuator is the default and should be in the platform starter.
Should readiness fail when a downstream service is slow?
No. If a downstream is slow, every pod sees the same slowness, so removing pods does not help. Timeouts, circuit breakers and fallback responses handle that inside the application, and readiness stays tied to whether this pod itself can serve.
8Conclusion
In this answer, we defined a probe standard for Spring Boot services on Kubernetes. Liveness uses /actuator/health/liveness and checks only internal state, readiness uses /actuator/health/readiness and includes only dependencies whose loss makes the pod useless, slow starters use a startup probe instead of a long initial delay, default periods, timeouts and thresholds come from platform templates with documented overrides, probes are served on a deliberately chosen port so load does not block them, and game days plus a pipeline lint keep the standard honest.
Open with
I would write three rules and put the defaults in our platform templates. First, liveness is /actuator/health/liveness and checks only the application's own state, never a database or a downstream service, because a restart cannot fix a dependency and including one causes restart storms.
Then, if they want more
If the app detects an internal failure only a restart fixes, it publishes LivenessState BROKEN. Second, readiness is /actuator/health/readiness, and by default it contains only the readiness state.
A team may add a dependency with the health group include property only if losing it makes this pod unable to serve anything and removing it from rotation helps, typically a per-pod dependency, not a shared database. Third, every service has a startup probe, polling every 5 seconds with a budget of around 3 minutes, and no initial delays.
Liveness polls every 10 seconds with a 3 second timeout and 3 failures, so a GC pause does not trigger a restart, and readiness polls every 5 seconds with 2 failures so traffic moves away quickly. Overrides go through template values with a written reason.
I would also decide where probes are served: a management port protects them from busy request threads, but readiness should reflect the main server, so I might expose readyz on the main port. Finally, game days and a pipeline lint check verify the standard.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Kubernetes documentation
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Define the health probe standard for all Spring Boot services on your Kubernetes...": https://scrivio-interview-library.netlify.app/spring-boot/containers-and-kubernetes/34b1e2cb07/