Resources / Serverless
Serverless functions explained: how they work and when to use them
What serverless functions are, how cold starts, scaling and pricing work, and which backend jobs they fit best.
A serverless function is a piece of code that runs on demand — when an HTTP request arrives, a schedule fires or an event happens — on infrastructure you never see. You don't provision servers, patch operating systems or pay for idle time.
How it works
- You deploy a function (usually one handler per endpoint or job).
- The platform runs it in an isolated sandbox when it's called, and keeps it warm while traffic continues.
- Many copies run in parallel under load; none run when there's no traffic.
- You pay for the time your code actually runs, usually in 100 ms or 1 ms steps.
Cold starts, honestly
The first request after a quiet period has to start a sandbox — a cold start. For small functions in JavaScript or Python this is typically a few hundred milliseconds. Keeping dependencies small and doing work lazily keeps it low; for most APIs, webhooks and jobs it doesn't matter.
What serverless is great for
- APIs with spiky or unpredictable traffic
- Webhook receivers (Stripe, GitHub, Shopify)
- Scheduled jobs: reports, syncs, cleanups
- Glue between SaaS tools
- Tools for AI agents
Where it's a poor fit
Long-running connections, heavy CPU work measured in minutes, and workloads that need a stateful process in memory are better on dedicated servers.
Serverless without the setup
Classic serverless still asks you to set up permissions, gateways, deploy pipelines and logging. Wisp gives you the serverless model without any of it: describe the endpoint, and it's deployed, versioned, logged and reachable at one URL per project.
Build it with Wisp — describe an API, get it live.