Platform Glossary

Scale to Zero

Category:

Definition

Scale to zero is a cloud compute model where a running application's instances are reduced to zero when there is no active traffic, eliminating compute costs entirely during idle periods.

Detailed Explanation

When an application "scales to zero," the container runtime terminates all active pods and suspends scheduling. No CPU cycles are consumed, no memory is allocated, and no compute bill accumulates.

When a new request arrives, an intermediary component (on Kubeletto, this is the Knative Activator) holds the incoming HTTP connection while a new container instance boots. Once the container is ready — typically within 1–3 seconds for a warm node — the request is forwarded and execution resumes normally.

Scale to zero is fundamentally different from "minimum 1 instance" autoscaling, where at least one container is always running and billing. True scale-to-zero drops all instances completely.

**Best suited for:** - Side projects and personal apps with sporadic traffic - Staging and preview environments that are mostly idle - Internal tools used only during business hours - API services with unpredictable or bursty usage patterns

**Less suited for:** - User-facing production apps requiring guaranteed sub-100ms first response - Applications with long initialization times (heavy JVM startup, large model loading)

On Kubeletto, scale-to-zero is the default behavior. You can disable it by setting min-scale to 1 in your application settings if consistent latency is required.

How Kubeletto provides Scale to Zero

Kubeletto uses Knative Serving's pod autoscaler (KPA) to track concurrent request counts. When requests drop to zero for a configurable idle period (default 10 minutes), KPA terminates active pods and activates the Knative Activator to buffer subsequent requests. This is enabled on every Kubeletto deployment with no configuration required.

Frequently Asked Questions

How long does a scale-to-zero cold start take?

On Kubeletto, cold starts typically take 1–5 seconds depending on your container image size and application startup time. Go and Rust binaries start in under 1 second; JVM and large Node.js apps may take 2–5 seconds.

Can I disable scale to zero on Kubeletto?

Yes. Set min-scale to 1 in your application's scaling settings to keep at least one instance running at all times.

Does scale to zero affect my database connections?

Yes. When a container scales to zero, all open database connections are closed. Use a connection pooler (PgBouncer, Neon pooling) to avoid connection storm on scale-up.

Is scale to zero the same as serverless?

Scale to zero is one characteristic of serverless architectures, but not the only one. Serverless also implies event-driven execution, managed infrastructure, and pay-per-use billing. Scale to zero is a subset of that model applied to container workloads.

See Scale to Zero in action

Deploy your first app on Kubeletto — free during our active beta.