Skip to content

Prepare for predictable demand

RequirementApproachSetup
Request replicas during a known time windowKEDA Cron triggerCron configuration and examples; select your installed KEDA version.
Change min/max replicas or other scaling fields during a windowScalingPolicyScheduled configuration example.
Scale ahead of demand inferred from metric historyPredictive scalerEnable Predictor, then forecast and scale a workload.

If live metrics already provide enough notice, keep live-demand scaling. If pods wait for nodes, prepare node capacity as well.

Illustrative prepared capacity becomes ready before demand, allowing time for node provisioning and application startup.
Scroll to explore
Diagram description

Illustrative demand increases after node provisioning and application startup. Prepared capacity is ready before demand, while reactive capacity arrives later. Use measured delays to choose the lead time.

  • Set timezone explicitly using an IANA zone, such as Europe/Prague, or UTC for a fixed UTC schedule. Local zones change their UTC offset with daylight saving; transition hours can be skipped or repeated. Avoid placing critical boundaries in those hours and verify both transitions for the installed controller.
  • Start the window before demand by at least the measured node-provisioning and pod/model-startup time, allowing for scaling evaluation delays. A scheduled replica count does not mean those replicas are Ready.
  • With the normal HPA metric combination, Cron’s desiredReplicas supplies a floor during the window; another trigger can request more. Keep maxReplicaCount high enough for both.
  • At Cron’s end, other triggers and minReplicaCount still apply. Reaching zero requires minReplicaCount: 0 and inactive zero-capable triggers; KEDA cooldown and HPA stabilization delay scale-in. Do not use desiredReplicas: "0" as an off-hours schedule.
  • ScalingPolicy changes configuration fields. Use its verification and pause procedure to check the target fields and their restoration; do not infer replica readiness from policy activation.

In the sample workload, compare predicted and observed demand using the same units and timestamps. Set the trigger’s horizon to cover measured startup time. Keep a live trigger, and test missing-model behavior before relying on prediction. Use model exploration to assess forecast quality and forecast diagnostics for ingestion or training failures.