Autoscaling and Cost Tradeoffs

Concepts covered: Pipeline Monitoring

Autoscaling sounds like the obvious answer, but interviewers probe the complexity it adds: when to scale up and how fast, when to scale down, and what over-provisioning costs. Those questions test whether you think about the business impact of technical decisions.

Autoscaling triggers

MetricScale-Up TriggerScale-Down TriggerRisk
Consumer lagLag > 100K and growing for 5 minLag stable near 0 for 30 minLag spikes from backfill can trigger false scale-up
CPU utilizationCPU > 80% for 3 minCPU < 30% for 15 minCPU may spike from GC, not actual load
Queue depth (SQS)Messages > 10K visibleMessages < 100 visibleDepth includes retries and dead letters
Processing latencyp99 latency > SLA for 5 minp99 < 50% of SLA for 15 minDownstream slowness looks like consumer slowness

Putting a cost on the scaling decision

Netflix and Stripe interviewers test FinOps awareness, and so do Airbnb's, meaning whether you can quantify the cost of your scaling decision. Most candidates never mention resource tagging or spend alerts, let alone reserved vs on-demand instances, so bringing them up reads as production maturity.

The L6 signal: 'I would tag all autoscaled resources with the pipeline name and team owner so we can attribute cost to the specific pipeline. If a pipeline's cost grows 5x month-over-month, that triggers a cost review before the next billing cycle.'

About this lesson

This section is part of the Backpressure and Scaling: Advanced lesson on DataDriven, the home of data engineering. Lessons cover SQL, Python, Spark, data modeling and pipeline architecture, and each section pairs its explanation with worked examples and practice you run as you go.