The KEDA deployer defaults minReplicaCount to 1, which means functions never scale to zero — KEDA will only scale down to the configured minimum.
Location: pkg/keda/deployer.go
This value is set on the HTTPScaledObject's Replicas.Min. For scale-to-zero to happen, minReplicaCount must be 0.
Current behavior: Functions always keep at least 1 replica running, even with no traffic.
Expected behavior: Consider defaulting to 0 so functions can scale to zero when idle, which is one of KEDA's main features. Users who prefer to avoid cold-start latency can explicitly set scale.min: 1 in their function config.
Trade-off: Changing the default to 0 enables scale-to-zero but introduces cold-start latency for the first request after idle. The KEDA HTTP add-on interceptor handles this by holding the request until a pod is ready, so requests aren't dropped — but latency increases.
The KEDA deployer defaults
minReplicaCountto1, which means functions never scale to zero — KEDA will only scale down to the configured minimum.Location:
pkg/keda/deployer.goThis value is set on the HTTPScaledObject's
Replicas.Min. For scale-to-zero to happen,minReplicaCountmust be0.Current behavior: Functions always keep at least 1 replica running, even with no traffic.
Expected behavior: Consider defaulting to
0so functions can scale to zero when idle, which is one of KEDA's main features. Users who prefer to avoid cold-start latency can explicitly setscale.min: 1in their function config.Trade-off: Changing the default to
0enables scale-to-zero but introduces cold-start latency for the first request after idle. The KEDA HTTP add-on interceptor handles this by holding the request until a pod is ready, so requests aren't dropped — but latency increases.