DevOps Engineer interview question · Most asked
Every deployment produces a burst of 502s. What do you check?
Summary
Readiness probes (new pods getting traffic before they're ready), graceful shutdown (does the app receive and handle SIGTERM: exec-form CMD, draining in-flight requests), the gap between SIGTERM and load balancers updating (a preStop delay), and keep-alive timeouts between the load balancer and the app.
Longer Answer
Pod termination durations equal to the grace period mean SIGTERM was ignored (often a shell-form CMD making /bin/sh PID 1). Error spikes aligned with deploy markers confirm the pattern. Long-lived connections need explicit draining.
Key Points
- Readiness probes.
- Exec-form CMD and SIGTERM handling.
- preStop delay for endpoint propagation.
- Keep-alive alignment.
Deep dive: DevOps in Production: Every Deploy Drops Requests
Explanation
What interviewers look for
Covering both the startup and shutdown sides of a rollout.
More most-asked DevOps Engineer questions
- Design a CI/CD pipeline for a containerised microservice from commit to production.
- Pods keep restarting with OOMKilled under load. How do you investigate and fix it?
- How do you handle database schema migrations in an automated deployment pipeline?
- How do you handle secrets in CI/CD pipelines securely?
- What happens when you type a URL into a browser and press Enter?
- A rollback after a release made the outage worse because the database had already been migrated. How do you design releases so rollbacks are always safe?
- What are DORA metrics, and how would you use them without gaming them?
- Your CI pipeline takes 45 minutes. How would you speed it up?