CI/CD & Deployment interview question · Most asked
What's the difference between liveness and readiness probes?
Summary
Readiness says whether an instance should receive traffic (dependencies ready, warmed up); failing removes it from load balancing without restarting. Liveness says whether the process is stuck; failing restarts the container. Startup probes give slow-starting apps time before liveness begins.
Longer Answer
Don't make liveness depend on external services (a database outage would restart every pod and worsen the incident).
Key Points
- Readiness: receive traffic?
- Liveness: restart?
- Startup probe for slow boots
- Keep liveness local
More most-asked CI/CD & Deployment questions
- What's the difference between continuous integration, continuous delivery and continuous deployment?
- What stages does a typical CI/CD pipeline contain?
- Compare rolling, blue-green and canary deployments.
- How do you run database migrations without downtime?
- What are best practices for writing Dockerfiles?
- How should secrets be handled in CI/CD pipelines?