Skip to content
Optimal Lab

DevOps · interactive

Serverless functions

Functions run only when called and bill per request and millisecond. Nothing runs, nothing is billed. Containers bill for every hour they're up, busy or not. Which is cheaper depends on traffic, and new function instances pay a cold start. Prices are examples.

0.1M req/mo300M

Solid: functions. Dashed: two always-on containers. Log scales.

Functions
$1.35/mo
Containers
$60/mo
Cold starts
4.0% of requests

At 3M requests a month, functions cost $1.35 vs $60 for containers. Low or bursty traffic: functions win because idle time is free.

Traffic shape

  1. 1

  2. 2

    A new instance loads your code first: tens of ms to seconds. Keep bundles small or pay for provisioned concurrency.

    Worst for rare, latency-sensitive calls.

  3. 3

  4. 4

In production

Tools and technologies

Serverless platforms bill per request and compute time.

Not tied to one language — use these names when you search docs or design a system.