Code RoomScale-in terminates active requests
MediumPrep Room Coding #2669

Scale-in terminates active requests

On-callReliability & on-callMid–Senior~25 min

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?

What a strong answer looks like

Stop the bleeding first (mitigate), then form hypotheses from real signals. Separate root cause from symptom, communicate status as you go, and close with what prevents a repeat.

0:00 of about 25 min
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.