AWS Builder Center

Why Autoscaling Alone Isn't Enough for Predictable Traffic Events

Autoscaling on EKS has gotten genuinely good. HPA reacts to load, Karpenter provisions nodes fast, and for the majority of traffic patterns that's the right design: don't pay for capacity you don't need, let the system react to demand as it arrives. Most of the time, reactive scaling is correct scaling.

Google cloud certified professional machine learning engineer
The problem shows up in a specific, recurring scenario: a traffic event you know is coming, where the ramp is steeper than your reactive scaling path can absorb before customers feel it.
This isn't a criticism of HPA or Karpenter. It's a gap in how teams tend to use them.
What "reactive" actually costs you
HPA scales pods based on observed metrics, typically CPU or memory, sometimes custom metrics via an adapter. That means there's an inherent lag: metrics have to breach a threshold, the controller has to act, new pods have to schedule, and if there's no room on existing nodes, Karpenter has to provision new capacity, and those new pods have to become ready.
On a well-tuned cluster, that whole loop might complete in one to a few minutes. For most gradual load increases, that's fine, the system catches up faster than user experience degrades.
For a traffic event with a steep ramp, a few minutes of provisioning lag lands squarely in the window where latency and error rates actually spike. By the time capacity catches up, the damage during the ramp has already happened. Autoscaling isn't broken here, it's doing exactly what it's designed to do, which is react. The problem is that reaction has a floor on how fast it can happen, and known traffic events can ramp faster than that floor.
The instinct to just overprovision permanently to avoid this is usually the wrong trade, because it reintroduces the cost problem autoscaling exists to solve, and it does it every day of the year to protect against events that happen occasionally.
The pattern: pre-scale for known events, let autoscaling handle the unknown ones
The useful design isn't "autoscaling versus manual capacity planning." It's autoscaling for the baseline and the unknowns, with a deliberate, time-boxed capacity floor for the events you can actually predict.
Concretely, on EKS with HPA and Karpenter, this looks like:
Set a minimum replica count on the HPA that only applies during a defined window, rather than a permanent floor. A scheduled job, whether that's a CronJob patching the HPA spec, an EventBridge rule invoking a Lambda that adjusts the HPA, or a controller like KEDA's cron scaler, raises minReplicas ahead of the event and lowers it again afterward.
Do the same for Karpenter indirectly. Karpenter provisions nodes based on unschedulable pods, so if you pre-scale your pod count ahead of the event, Karpenter provisions the underlying capacity ahead of the event too. You're not bypassing Karpenter, you're giving it a reason to act early instead of reactively.
Time-box it tightly. The floor should exist for the duration of the known risk window, not indefinitely. A pre-scale that never gets reverted is just permanent overprovisioning with extra steps.
Treat the trigger as policy, not memory. If the pre-scale depends on someone remembering to run a command before a known event, it will eventually get missed on the one day it mattered. Tie it to a calendar of known events, or better, tie it to whatever system already knows the event is coming (a marketing campaign scheduler, a release calendar, a sports schedule, whatever's relevant to the domain) so the scaling decision isn't a manual step someone has to recall under pressure.
What this looks like as actual configuration
The cleanest way to implement the time-boxed floor on EKS is with KEDA's cron trigger, if KEDA is already in the cluster, since it lets you express the schedule declaratively instead of scripting HPA patches yourself.
A ScaledObject with a cron trigger might look like this:
apiVersion: keda.sh/v1alpha1 kind: ScaledObject metadata: name: checkout-service-prescale namespace: prod spec: scaleTargetRef: name: checkout-service minReplicaCount: 3 maxReplicaCount: 50 triggers: - type: cron metadata: timezone: America/Chicago start: 0 8 * * 1-5 end: 0 11 * * 1-5 desiredReplicas: "20" - type: cpu metadata: type: Utilization value: "65"
Outside the cron window, KEDA falls back to the CPU trigger and the deployment scales like normal. Inside the window, the cron trigger's desiredReplicas becomes the floor, so the deployment sits at 20 replicas regardless of current CPU utilization. When the window ends, the floor disappears and CPU-based scaling takes back over immediately, no manual revert step required.
If KEDA isn't in the cluster and adding it isn't worth it for this alone, the same idea works with a plain CronJob that patches the HPA's minReplicas field at the start of the window and patches it back down at the end:
apiVersion: batch/v1 kind: CronJob metadata: name: prescale-checkout-hpa namespace: prod spec: schedule: "0 8 * * 1-5" jobTemplate: spec: template: spec: serviceAccountName: hpa-patcher containers: - name: kubectl image: bitnami/kubectl:1.30 command: - kubectl - patch - hpa - checkout-service - -n - prod - --type=merge - -p - '{"spec":{"minReplicas":20}}' restartPolicy: OnFailure
This is less elegant than the KEDA version and needs a matching CronJob to revert minReplicas afterward, but it avoids adding a new controller if the team doesn't already run one.
Karpenter's role, and the consolidation trap
Raising the HPA floor doesn't provision nodes by itself. It creates unschedulable pods, and Karpenter reacts to that by launching capacity, same as it would for any other scaling event. The pre-scale is really pre-scaling the pod count, and Karpenter's job is still reactive underneath it, just triggered earlier than it would have been otherwise.
The detail that catches people out here is Karpenter's consolidation behavior. If a NodePool has a consolidation policy of WhenEmptyOrUnderutilized, Karpenter will actively try to shrink or replace nodes it judges as underutilized, which is exactly the right behavior most of the time. But if you pre-scale pods well ahead of the actual traffic ramp, and those pods sit at low CPU utilization for a while before real load arrives, Karpenter can interpret that window as an opportunity to consolidate, working directly against the capacity you just asked for.
Two ways to avoid that: keep the gap between pre-scale and the actual event short enough that consolidation doesn't have time to act, or scope a separate NodePool for the event window with a WhenEmpty consolidation policy instead, so nodes are only reclaimed once they're genuinely empty rather than merely underutilized. The second option is more deliberate and avoids the timing race entirely.
A worked example
Say a checkout service normally runs at 4 to 6 replicas and handles a traffic ramp from 200 to 1,800 requests per second in about three minutes during a known event, a flash sale, a marketing push, whatever the domain-specific trigger is.
Left purely reactive, HPA needs a few polling cycles to notice the CPU or request-rate breach, then schedules new pods. If there isn't headroom on existing nodes, Karpenter has to launch new EC2 capacity, and depending on instance type and image size, that can take one to two minutes before the node is Ready and pods are scheduled and warmed up. Against a three-minute ramp, a large fraction of that ramp happens before capacity actually lands, which is exactly the window where latency and error rate spike.
With a fifteen-minute pre-scale window ahead of the known start time, the pod count and underlying nodes are already in place before request volume starts climbing. HPA and Karpenter are still active and still doing their normal job for anything beyond what was pre-scaled, but the steepest part of the ramp is absorbed by capacity that's already warm, not capacity that's still being provisioned.
What this doesn't fix
Pre-scaling buys you headroom for the ramp. It doesn't fix an application that falls over past a certain concurrency regardless of available compute, a database or downstream dependency that becomes the actual bottleneck once traffic increases, or a traffic spike you didn't know was coming, which is still HPA and Karpenter's job to absorb as well as they can.
It's worth being honest that pre-scaling is a mitigation for the class of failure where compute provisioning lag is the bottleneck. If load testing hasn't actually confirmed that's your bottleneck, pre-scaling ahead of an event and still seeing degradation just tells you the real constraint is somewhere else, which is useful information, but it means the fix is elsewhere too.
The cost conversation is worth having honestly
Any pre-scaling policy is a deliberate cost decision, and it should be argued as one, not smuggled in as a technical default. The honest framing to a FinOps-conscious stakeholder isn't "we need more capacity," it's a comparison: the cost of running extra capacity for a known, bounded window, against the cost of degraded service or an incident during a traffic event you could see coming. That's a trade-off worth making explicitly and revisiting after the event, not a decision to make once and never audit again.
Where this fits with autoscaling philosophy
None of this contradicts the case for autoscaling. It's the same logic applied at a different time horizon. Autoscaling handles variance you can't predict. Scheduled pre-scaling handles variance you can. Treating every traffic pattern as equally unpredictable, when some of it is calendar-known, is leaving a known risk unmanaged for the sake of architectural purity.
The teams that get burned by this usually aren't the ones without autoscaling. They're the ones who have good autoscaling and assume that's sufficient for every kind of traffic event, including the ones they could have seen coming.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article