Skip to content
RED SAGSkills
easyDevOps Engineer interview question

How does a load balancer use health checks, and what makes a good health check endpoint?

What the interviewer wants to hear

  • Load balancer probes targets and removes unhealthy ones from rotation
  • Thresholds and intervals avoid flapping
  • Endpoint should be cheap and reflect ability to serve traffic
  • Avoid deep dependency checks that cause cascading removal
  • Difference between liveness and readiness style checks

Model answer

A load balancer sends periodic requests, for example HTTP GET /healthz every 10 seconds, to each target. After a set number of failures it stops sending user traffic there, and after a number of successes it adds the target back. These thresholds prevent flapping on a single slow response. A good endpoint is fast and cheap, needs no authentication, and answers whether this instance can serve requests right now, such as having finished startup and loaded config. I avoid making it check every downstream dependency: if a shared database blips and every instance fails its check, the load balancer removes all of them and a partial outage becomes a full one. In Kubernetes I separate readiness, which controls traffic, from liveness, which restarts the container, and keep liveness very simple so it only catches a truly stuck process.

Can you answer it under time pressure?

Take a timed easy round and get scored on every answer.

Start mock interview

More easy DevOps Engineer questions