A deploy went out and p99 latency doubled. Walk me through it.
IntermediateScenarioDeployments and releases
Answer
Situation read → A latency regression that lines up with a deploy is guilty until proven innocent. Users are hurting now, so mitigation comes before root cause.
What I'd do →
- Confirm the correlation: overlay the deploy marker on the p99 graph in Grafana and check whether only the new pods are slow.
kubectl rollout history deployment/checkout -n prod
kubectl get pods -n prod -l app=checkout -o wide --sort-by=.metadata.creationTimestamp
- If it lines up, roll back first and debug second.
kubectl rollout undo deployment/checkout -n prod
kubectl rollout status deployment/checkout -n prod
- With users safe, diff the two releases:
git log v1.41..v1.42 --oneline, the image, the Helm values, and resource requests or limits (a lowered CPU limit causes throttling that shows up as p99 latency). - Look at traces for the slow span (new DB query, new downstream call, missing cache) and check
container_cpu_cfs_throttled_periods_totalfor throttling. - Reproduce in staging with a load test, fix, and redeploy behind a canary.
Why → Rollback is cheap and reversible. Debugging live while p99 is doubled burns error budget for no gain.
Interview tip → Say "roll back first, root-cause second" in the first 30 seconds; that is what they are listening for.
More on Deployments and releases
You deployed a new version and half the pods are in CrashLoopBackOff. What do you do?BeginnerA release passed every test in staging but broke in production. How do you investigate?IntermediateHow would you design a zero-downtime deployment for a stateless API on Kubernetes?BeginnerEvery deploy causes a short spike of 502 errors from the ALB. Why, and how do you fix it?IntermediateHow would you set up a canary release, and what decides whether it gets promoted?IntermediateBlue-green or canary? How do you choose for a specific service?Beginner