infrastructure//serverless

Serverless is an execution model in which the cloud provider runs backend code on demand, per request, with no server process kept alive and no servers for the developer to manage. When a request arrives a function spins up, runs its handler, returns the response and is destroyed, and the cloud provider handles everything around it.


Serverless is an execution model in which the cloud provider runs backend code on demand, per request, with no server process kept alive and no servers for the developer to manage. When a request arrives a function spins up, runs its handler, returns the response and is destroyed, and the cloud provider handles everything around it.

No process runs 24/7: the developer deploys functions, the provider handles scaling, routing and lifecycle, and the bill is per invocation, not per hour.

Cold starts are the main tradeoff: the first request after a period of idleness may be slower.

AWS Lambda, Cloudflare Workers, Vercel Edge Functions and Google Cloud Functions all work this way. Edge functions are serverless too, since they run per request and die after: the edge part of the name says where the code runs (edge computing), the serverless part says how.

Traditional hosting is the contrast, where a Node/Express process runs continuously.

A personal note26 · mar 10Read notelet's build intuition for what serverless actually means. there is no server. there is no process listening on a port. when a request arrives, a function spins up, executes your handler, returns a response, and is destroyed. that's it. you define what should happen when something happens. cloud provider handles the rest.