Interview Prep/Real-World Interview/Scaling and performance

A batch job that used to take 1 hour now takes 6. Nothing in its code changed. What do you check?

IntermediateScenarioScaling and performance
Answer

Situation read → If the code didn't change, the input, the environment or the dependencies did.

What I'd do →

  1. Data volume: did the input grow (table size, files to process)?
  2. Database: table bloat, missing vacuum or stale statistics, an index dropped, lock contention with a new daytime workload.
  3. Infrastructure: instance type changed, Spot node interruptions restarting it, EBS volume out of gp2 burst credits, or a lower CPU limit.
  4. Network: now crossing AZs or going through a NAT gateway instead of a VPC endpoint to S3.
  5. Instrument the job's phases to see which one grew, then fix that phase.
kubectl get job nightly-etl -n batch -o yaml | grep -A5 resources

Why → gp2 burst credits and table bloat both cause gradual, "nothing changed" slowdowns.

Interview tip → Asking "what else changed?" methodically is the skill being tested.

All Real-World Interview questions Roadmap: Interview readiness

More on Scaling and performance