Skip to content

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.

  • 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.

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).

  • 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).