UptimeUptime Wiki

Functions (per-request, per-ms billing)

With functions the customer uploads a snippet of code instead of renting a whole machine. You run it only when someone actually calls it, and you bill per request plus per millisecond of run time. No always-on box sitting idle, no server for them to manage -- when nothing's happening, it costs almost nothing.

The flip side of "nothing running when idle" is the cold start: the very first call after a quiet spell waits a beat while you spin the code up. After that it's warm and fast. That trade -- tiny idle cost for a little first-call lag -- makes functions perfect for hobbyists, webhooks, scheduled jobs, and spiky workloads that sit quiet then suddenly stampede.

Detailed explanation

Execution + billing

A function invocation is a short-lived execution with a memory size (128 MB - 512 MB typical) and a duration; billing is per-request + per-GB-millisecond, so idle cost trends to zero. No reserved host capacity -- invocations bin-pack opportunistically onto free compute. Cold-start latency lands on the first call after the warm pool drains; sustained traffic keeps instances warm and amortises it away.

Where it fits

Ideal for SteadyPlusBurst and EventDriven shapes -- webhooks, release-day docs spikes, viral bursts -- where an always-on VM would be mostly wasted. Functions usually sit behind a load balancer or an API gateway for ingress. Contrast with VMs: a VM is the right call once the workload is steady enough that the reserved box is cheaper than per-request billing.

On this page