Engineering

What is Serverless?

Serverless is the model where the server spins up on demand when the request arrives and dies after — pay per execution, not for a 24/7 server.

Advantage: zero idle cost, auto-scales to infinity (theoretically). Principles: AWS Lambda, Vercel Functions, Cloudflare Workers. Billing in CPU milliseconds.

Limits: cold start (1st request slow), time-limited execution (10-15min), no persistent state (needs external DB). Doesn't fit workloads with critical latency and constant peak.

Frequently asked questions

Is serverless always cheaper?
For variable traffic, a lot. For high 24/7 load, reserved EC2/container wins on cost.
Is cold start a real problem?
Yes for the UX of rare first requests. Edge functions reduce it to ~milliseconds. Provisioned concurrency solves it on Lambda.