Tools / Monitoring and Observability Interview Questions
What is a health check endpoint and what should it return?
A health check endpoint is an HTTP endpoint — typically /health, /healthz, or /actuator/health — that exposes the current health status of a service. Load balancers, orchestrators like Kubernetes, and monitoring systems poll this endpoint to determine whether the service is ready to receive traffic.
There are two distinct types of health checks that should be implemented separately:
Liveness probe: Answers the question "Is the application alive or should it be restarted?" It should only check whether the process is responsive — not whether its dependencies are healthy. If the liveness probe checks the database and the database goes down, Kubernetes would restart every pod unnecessarily, causing a cascading failure.
Readiness probe: Answers the question "Is the application ready to serve traffic?" This is where dependency checks belong. If the application cannot connect to its database, it should return a non-200 response here, and the load balancer will stop routing requests to it until it recovers.
A good health check response includes: overall status (UP/DOWN/DEGRADED), individual component statuses (database, cache, downstream services), response time of each dependency check, and optionally version information. Spring Boot Actuator's /actuator/health endpoint follows this structure natively and aggregates individual health indicators.
Health checks should be fast (under 100 ms) and should not perform expensive operations — otherwise the health check itself becomes a bottleneck under load.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
