infrastructure//edge computing//cold start

A cold start is the extra latency on the first request to a serverless function, when its runtime has not been initialized yet. The first request goes through every step, while subsequent requests find the function already warm and are fast:


A cold start is the extra latency on the first request to a serverless function, when its runtime has not been initialized yet. The first request goes through every step, while subsequent requests find the function already warm and are fast:

1Spin up the runtime2Load the code3Execute4Respond

In Lambda (containers), cold starts range from 100 ms to more than 1 s depending on the language and the bundle size, because the container has to boot.

In Workers (V8 isolates), cold starts are close to 0 ms because isolates are ultra-lightweight: no container, no VM, no OS boot, only V8 spinning up a sandbox. This is the main reason Workers feel faster than Lambda on the first request.

After an idle period (no requests for a while), the function goes cold again and the next request pays the startup cost.