# Scale to zero

> Scale to zero removes an idle web deployment's replicas entirely so it costs nothing until the next request wakes it.

**Scale to zero is a setting that lets a web deployment on Ownkube Compute drop to zero running replicas when it stops receiving traffic, then wake again on the next request.** Because active CPU and working-set memory only bill while a replica exists, an app at zero replicas costs nothing while it sleeps.

To turn it on, switch on **Scale to zero** in a web deployment's Settings tab and choose how long the app can go without requests before it sleeps (1 to 60 minutes, 5 by default). Ownkube then removes all replicas once that idle window passes, and starts a replica again as soon as a new request arrives. That first request pays a brief [cold start](/docs/glossary/cold-start) while the replica wakes; every request after it is served normally.

Every web app, database and cache on Ownkube Compute can sleep. A web app needs a public hostname, since the incoming request is what wakes it, and a database or cache wakes on its next connection. See [Sleep and wake](/docs/deployments/sleep). It doesn't apply to jobs, which run to completion rather than serve traffic, or to clusters in your own cloud.

Scale to zero is the sharpest edge of [active-CPU billing](/docs/glossary/active-cpu-billing) and [working-set memory](/docs/glossary/working-set-memory) metering, because it removes an idle app's cost entirely. It suits low-traffic personal projects, staging environments and preview deployments that sit unused for long stretches between visits.

- [Sleep when idle](/docs/deployments/sleep)
- [Scaling](/docs/deployments/autoscaling)

**Don't see a feature you need?** Email [support@ownkube.io](mailto:support@ownkube.io?subject=Feature%20request). Ownkube is shaped by the teams using it and we ship what our users ask for.

## Search

This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_c64dfe8ffaa8d3ad19576838&query=<URL-encoded question>. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so.
