📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

Should a Kubernetes readiness probe check the service's downstream dependencies, such as its database or other services?

Mid-Level Theory Intermediate distributed-systems health-checks kubernetes microservices readiness-probe

🎯 Key points

  • Readiness = can this instance serve traffic right now (started, warmed up, not draining)
  • Checking a shared database or service marks every pod unready at once and turns a partial outage into a total one
  • Liveness only detects a stuck process; never check dependencies in liveness
  • Handle dependency failure in the request path: timeouts, circuit breakers, fallbacks, degraded responses
  • Separate endpoints: /health/live and /health/ready with tagged ASP.NET Core health checks
  • Exception: a dependency private to one instance (local sidecar, per-pod cache) or a hard 'cannot serve anything' prerequisite
  • Design against the SLO: a degraded 200 often beats a removed pod and a 503 from the ingress

⏱ 30-second answer

Mostly no. Readiness should say whether this instance can serve traffic: started, warmed up, not shutting down. If it checks a shared database or another service, one dependency outage marks every pod unready, discovery removes them all, and a partial outage (some endpoints still worked, cached reads still worked) becomes a total one.

  • Check local prerequisites; handle dependency failures in the request path with timeouts, circuit breakers and fallbacks.
  • Exceptions: a dependency that belongs to this instance only (a sidecar, a per-pod cache warm-up), or a prerequisite without which the instance can serve nothing at all and the failure is instance-specific.
  • Liveness is narrower still: only a stuck process.

The trade-off is against the SLO: serving degraded responses usually costs less error budget than having zero ready pods.

🔍 What the interviewer is checking

Checks they understand how probe design causes or prevents cascading failure across a whole deployment.

Green flags

  • Distinguishes instance-local from shared dependencies
  • Names the exceptions and explains why they are instance-specific
  • Links the choice to the SLO and degraded-mode behaviour

Red flags

  • Puts a database ping in the liveness probe (causes restart loops)
  • Assumes 'unready' is harmless during a dependency outage

↩ Usually asked after

More in Microservices

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me