The economics of scale-to-zero
When sleeping instances save real money, when they don't, and how to reason about cold starts, with the arithmetic shown.
Per-second billing only matters if your app is sometimes idle. This post works through the numbers using Aloof's current price list.
The baseline
A shared-1x-1gb instance costs $0.0083/hour, which is $5.99 for a 30-day month always-on. With scale-to-zero, an app that's busy two hours a day costs about $0.50/month. One that serves office hours (8 h × 22 working days) costs about $1.46.
| Usage pattern | Billed hours / month | Cost on shared-1x-1gb |
|---|---|---|
| Always on | 720 | $5.99 |
| Office hours (8 h × 22 d) | 176 | $1.46 |
| 2 h/day | 60 | $0.50 |
| Webhook receiver, ~10 min/day awake | 5 | $0.04 |
"Awake" includes the idle window before sleep: an app sleeps after idle_seconds with no in-flight requests (60 s by default, and at most 5 minutes on the free tier). A request every 50 seconds keeps it awake permanently, so look at your traffic gaps rather than your request count.
What a cold start costs you
When a sleeping app gets a request, the edge holds it, starts an instance and forwards the request once the instance passes its readiness check. Latency for that first request is container start plus your app's boot time. That ranges from well under a second for a Go binary to many seconds for a large Rails or JVM app. Measure your own: curl -w '%{time_total}' after the app has slept.
When not to scale to zero
- Latency-sensitive APIs: set
min_machines_running = 1and let autoscaling handle peaks. - Workers and consumers: process groups like
workernever sleep, by design. A queue consumer can't be woken by HTTP. - Apps with volumes and long boots: the single-writer volume rule means one instance at a time, so every wake is a full boot.
Free tier
The free tier always sleeps after idle and is hard-capped at $1 of usage per month. When the cap is reached, apps pause with HTTP 402 rather than bill you. That cap is the reason it can be free.
More posts
- Deploying FastAPI with Postgres on Aloof
- Next.js and Rails on Aloof: two stacks, one workflow
- MCP: let your AI agent deploy (safely)
- Private networking with .internal
- Zero-downtime deploys and instant rollbacks
- Managed Postgres backups, off-site and encrypted
- Aloof vs Fly.io, Render and Railway: how they compare