Interview Prep/Real-World Interview/Deployments and releases

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 →

  1. 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
  1. If it lines up, roll back first and debug second.
kubectl rollout undo deployment/checkout -n prod
kubectl rollout status deployment/checkout -n prod
  1. 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).
  2. Look at traces for the slow span (new DB query, new downstream call, missing cache) and check container_cpu_cfs_throttled_periods_total for throttling.
  3. 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.

All Real-World Interview questions Roadmap: Interview readiness

More on Deployments and releases