Scale-in terminates active requests

On-call incidentMedium25 min

Your task

After the morning peak passes, your autoscaler scales the fleet in from 50 to 20 instances to save cost. Right at each scale-in step you get a brief burst of 502s and a spike in failed requests, then it's clean again, the bursts line up exactly with terminations in the scaling event log. Long-running requests (some take 20–30s) on terminating instances are getting cut off mid-flight. The instances are stateless. Recent context: a platform upgrade last week shortened the default termination grace period. How do you triage and fix?

It covers

  • Scale in too aggressive
  • Graceful shutdown
  • In flight drop