Systems & Backend

Cold Start

The extra latency when a serverless function or scaled-to-zero service handles its first request and must spin up.

A cold start is the added latency when a serverless function or an idle, scaled-to-zero service receives a request and must first initialize — allocate a container, load the runtime, run startup code — before it can respond. Subsequent “warm” requests skip this.

Worked example: a Lambda that has not run recently may take hundreds of milliseconds to a few seconds extra on its first invocation while the container boots, then respond instantly for a while after. Gotcha: cold starts hit latency-sensitive and bursty workloads hardest; mitigations are provisioned/warm instances (costs money to keep them idle), smaller deployment packages, and lighter runtimes — a direct trade of cost against tail latency.