Health Checks Interview Questions and Answers (15 Must-Know Questions)
Master Health Checks with 15 interview questions and answers. Learn liveness, readiness, startup probes, Spring Boot Actuator, Kubernetes health checks, production monitoring, cloud-native deployment, and enterprise best practices.
Introduction
Modern applications must be able to automatically report whether they are running, ready to receive traffic, and operating correctly. In cloud-native environments such as Kubernetes, health checks are essential for maintaining high availability and enabling self-healing systems.
A service may still be running as a Java process but be unable to serve requests because of database failures, exhausted thread pools, memory issues, or dependency outages. Health Checks continuously evaluate the application's operational state so orchestration platforms can take corrective actions such as restarting containers or temporarily removing unhealthy instances from load balancers.
Spring Boot provides built-in health monitoring through Spring Boot Actuator, while Kubernetes uses Liveness, Readiness, and Startup Probes to automate application lifecycle management.
Health Checks are one of the most frequently asked interview topics for Java Backend, Spring Boot, Kubernetes, Microservices, DevOps, SRE, Cloud, and Solution Architect roles.
What You'll Learn
- Health Check Fundamentals
- Spring Boot Actuator
- Liveness Probe
- Readiness Probe
- Startup Probe
- Kubernetes Health Checks
- Dependency Health
- Production Monitoring
- Best Practices
- Enterprise Architecture
Enterprise Health Check Architecture
flowchart TD
CA["Client Applications"] --> LB["Load Balancer"]
LB --> SBA["Spring Boot A\n/actuator/health"]
LB --> SBB["Spring Boot B\n/actuator/health"]
LB --> SBC["Spring Boot C\n/actuator/health"]
SbaSbbSbc["SBA & SBB & SBC"] --> K8S["Kubernetes"]
K8S --> LP["Liveness Probe"]
K8S --> RP["Readiness Probe"]
K8S --> SP["Startup Probe"]
LpRpSp["LP & RP & SP"] --> ACT["Restart • Route Traffic • Scale"]
Health Check Request Flow
flowchart TD
K8S["Kubernetes"] --> HR["HTTP Request"]
HR --> AH["/actuator/health"]
AH --> SB["Spring Boot"]
SB --> CD["Check Dependencies"]
CD --> HU{"Healthy / Unhealthy?"}
HU --> KA["Kubernetes Action\n(Route / Restart / Scale)"]
1. What are Health Checks?
Answer
Health Checks are mechanisms that determine whether an application is functioning correctly.
They verify:
- Application availability
- Dependency status
- Resource availability
- Operational readiness
- Overall system health
Health checks allow monitoring platforms and orchestration systems to respond automatically to failures.
2. Why are Health Checks Important?
Answer
Without health checks, unhealthy services may continue receiving user traffic.
Health checks help organizations:
- Improve availability
- Enable self-healing
- Reduce downtime
- Prevent routing to failed instances
- Detect dependency failures
- Support autoscaling
- Improve customer experience
Health checks are a key part of resilient cloud-native systems.
3. What is Spring Boot Actuator?
Answer
Spring Boot Actuator provides production-ready endpoints for monitoring and management.
Common endpoints include:
/actuator/health/actuator/info/actuator/metrics/actuator/prometheus/actuator/env
Example dependency
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
Actuator integrates with monitoring platforms and Kubernetes.
4. What is a Liveness Probe?
Answer
A Liveness Probe determines whether an application is still running.
Example
Application
↓
Liveness Probe
↓
Healthy
↓
Continue Running
If the probe fails repeatedly, Kubernetes restarts the container.
Typical failures include:
- Deadlocks
- Infinite loops
- JVM hangs
- Unrecoverable application errors
5. What is a Readiness Probe?
Answer
A Readiness Probe determines whether an application is ready to receive traffic.
Example
Application Starting
↓
Database Connection
↓
Ready
↓
Receive Requests
If the readiness probe fails, Kubernetes removes the instance from the load balancer but does not restart it.
6. What is a Startup Probe?
Answer
A Startup Probe checks whether an application has completed startup successfully.
This is useful for applications with:
- Long initialization times
- Cache loading
- Large data migrations
- Machine learning model loading
Startup probes prevent premature restarts during application initialization.
7. What is the Difference Between Liveness, Readiness, and Startup Probes?
Answer
| Probe | Purpose | Kubernetes Action |
|---|---|---|
| Liveness | Is the application alive? | Restart container |
| Readiness | Can it serve requests? | Remove from traffic |
| Startup | Has startup completed? | Delay liveness checks |
Each probe serves a distinct purpose in application lifecycle management.
8. What Does /actuator/health Return?
Answer
Example
{
"status": "UP",
"components": {
"db": {
"status": "UP"
},
"diskSpace": {
"status": "UP"
}
}
}
The endpoint reports overall application health along with the status of configured components.
9. What Dependencies Can Be Checked?
Answer
Health indicators commonly verify:
- Database connectivity
- Redis
- Kafka
- RabbitMQ
- Elasticsearch
- Disk space
- External REST APIs
- gRPC services
- Message queues
- Custom business dependencies
Dependency health provides a more accurate picture of application readiness.
10. How Does Kubernetes Use Health Checks?
Answer
Workflow
Kubernetes
↓
Health Probe
↓
Healthy
↓
Continue Serving Traffic
If unhealthy:
Readiness Failure
↓
Remove From Load Balancer
or
Liveness Failure
↓
Restart Container
Kubernetes continuously evaluates application health to maintain availability.
11. What are Common Health Check Mistakes?
Answer
Common mistakes include:
- Slow health endpoints
- Checking unnecessary dependencies
- Returning HTTP 200 for failures
- Missing readiness probes
- Aggressive restart intervals
- No startup probe
- Ignoring dependency failures
- Heavy database queries
- No timeout configuration
- Exposing sensitive health information
These issues reduce system reliability.
12. What are Enterprise Health Check Best Practices?
Answer
Recommended practices:
- Keep health endpoints lightweight
- Separate liveness and readiness logic
- Implement startup probes
- Check critical dependencies only
- Configure appropriate timeouts
- Secure management endpoints
- Avoid expensive operations
- Monitor probe failures
- Create custom health indicators
- Test failure scenarios regularly
These practices improve application resilience.
13. How Do Custom Health Indicators Work?
Answer
Spring Boot allows developers to create custom health indicators.
Example use cases:
- License validation
- External payment gateway status
- Business rule verification
- Cache synchronization
- Third-party API availability
Custom indicators extend default health reporting with application-specific checks.
14. How Do Health Checks Improve Production Reliability?
Answer
Health checks help engineering teams:
- Detect failures early
- Automate recovery
- Prevent routing to unhealthy instances
- Improve deployment safety
- Support zero-downtime releases
- Enable autoscaling decisions
- Increase application availability
They are fundamental to cloud-native reliability.
15. What Does an Enterprise Health Check Architecture Look Like?
Answer
Internet Users
│
▼
Load Balancer
│
┌───────────────┼────────────────┐
▼ ▼ ▼
Spring Boot A Spring Boot B Spring Boot C
│ │ │
▼ ▼ ▼
/actuator/health Endpoints
│ │ │
└───────────────┼────────────────┘
▼
Kubernetes
┌───────────────┼────────────────┐
▼ ▼ ▼
Liveness Readiness Startup
Probe Probe Probe
│ │ │
└───────────────┼────────────────┘
▼
Prometheus • Grafana • Alertmanager
│
▼
Autoscaling • Self-Healing
Enterprise Components
- Spring Boot Actuator
- Health Endpoint
- Liveness Probe
- Readiness Probe
- Startup Probe
- Kubernetes
- Prometheus
- Grafana
- Alertmanager
- Load Balancer
Health Checks Summary
| Component | Purpose |
|---|---|
| Spring Boot Actuator | Expose health endpoints |
/actuator/health |
Report application health |
| Liveness Probe | Verify application is alive |
| Readiness Probe | Verify application can serve traffic |
| Startup Probe | Verify startup completion |
| Health Indicator | Check dependencies |
| Kubernetes | Execute health probes |
| Load Balancer | Route traffic to healthy instances |
| Prometheus | Monitor health metrics |
| Alertmanager | Notify on failures |
Interview Tips
- Explain Health Checks as mechanisms that verify whether an application is running, ready to serve requests, and operating correctly.
- Clearly differentiate Liveness, Readiness, and Startup Probes, including Kubernetes actions for each.
- Describe Spring Boot Actuator as the standard way to expose health endpoints.
- Explain why readiness checks should verify critical dependencies while liveness checks should focus on application health.
- Discuss custom Health Indicators for business-specific dependency validation.
- Highlight the importance of lightweight health endpoints that avoid expensive database queries.
- Explain how Kubernetes uses probe failures to restart containers or remove instances from load balancers.
- Mention production considerations such as timeout settings, probe intervals, and failure thresholds.
- Discuss integrating health checks with Prometheus, Grafana, and Alertmanager for monitoring and alerting.
- Use enterprise examples involving banking, Kubernetes, cloud platforms, and microservices to demonstrate self-healing and zero-downtime deployments.
Key Takeaways
- Health Checks continuously verify application availability, readiness, and operational status.
- Spring Boot Actuator provides built-in health endpoints for production monitoring.
- Liveness Probes determine whether a container should be restarted.
- Readiness Probes determine whether a service should receive production traffic.
- Startup Probes prevent premature restarts during long application initialization.
- Custom Health Indicators allow applications to validate business-specific dependencies.
- Kubernetes uses health checks to enable self-healing, high availability, and zero-downtime deployments.
- Lightweight and meaningful health endpoints improve reliability and reduce false positives.
- Health Checks integrate with monitoring platforms such as Prometheus and Grafana to provide operational visibility.
- Health Checks is a core interview topic for Java, Spring Boot, Kubernetes, Microservices, DevOps, SRE, Cloud, and Solution Architect roles.