Functions (scale-to-zero)
A Function is an HTTP service that scales to zero when it’s idle and cold-starts on the next request. It behaves like a normal web service, but it doesn’t stay running (and doesn’t cost you) when nothing is calling it.
How it works
Section titled “How it works”- When a Function goes idle for its configured window, it’s stopped.
- The first request after that wakes it up (a brief cold-start), then it serves normally.
- While it’s down it consumes no CPU or RAM — and on the RAM-billed plans, it costs nothing for that time.
Idle timeout
Section titled “Idle timeout”Set the idle timeout — how long with no traffic before it scales to zero. The default is a few minutes; you can tune it from 30 seconds up to 24 hours depending on how latency-sensitive your traffic is (a shorter timeout saves more; a longer one avoids more cold-starts).
When to use one
Section titled “When to use one”- Internal tools, admin panels, or webhooks that are used occasionally.
- Preview/staging environments that sit idle most of the day.
- Any HTTP workload where paying for 24/7 uptime doesn’t make sense.
For always-on traffic, use a plain Web service instead (Service types).
- Add a custom domain — a Function gets a URL like any web service.
- Understand billing on the Choosing a plan page.