A cold start is the extra delay a serverless request pays when the platform must load and initialize a new copy of the function first. Cloudflare defines it as "the time it takes to load and execute a new copy of a serverless function for the first time." A request served by a ready copy is a warm start.
Why do cold starts matter if they are rare?
Cold starts land in the slowest requests, so they shape tail latency rather than the average. AWS's documentation of the Lambda execution environment lifecycle says cold starts "typically occur in under 1% of invocations" and that their duration "varies from under 100 ms to over 1 second". A one-second pause on a sign-in, a payment or a chart lookup is a one-second pause for that person, however rare it is in aggregate.
AWS also notes that cold starts are more common in development and test functions because those are invoked less often. Many internal business tools have the same traffic shape: quiet for long stretches, then busy.
How do isolate platforms change the picture?
Cloudflare Workers start each script in a V8 isolate rather than a container. In its post Eliminating cold starts with Cloudflare Workers (July 2020), Cloudflare says isolates warm up a function "in under 5 milliseconds". The same post describes loading the Worker during the TLS handshake: the hostname in the client's first packet, the Server Name Indication, triggers the load, so the Worker is usually ready when the request arrives.
That is a property of the runtime, not of everything the code touches. A Worker that opens a fresh database connection on its first request still pays for several network round trips to set that connection up, which is the problem Hyperdrive addresses with connection pooling near the database.
How does EOXLABS design around cold starts?
EOXLABS keeps start-up work small and measures first-request latency separately from steady-state latency, so cold paths stay visible instead of being averaged away. In practice:
- Bundles stay small, and expensive setup is deferred until a route needs it.
- Database access goes through a pooler, so a new isolate does not open its own Postgres connection.
- Latency reports separate the first request after a deploy, a cache miss and a new connection from ordinary traffic.
For latency targets at the edge, see the sub-50 ms edge latency note; for the runtime, see the Cloudflare Workers stack page.
What is a cold start confused with?
- A cold cache. A Workers KV "cold read" means the value was not cached nearby and had to come from central stores. That is a data-path delay, not a runtime start-up.
- Connection setup. TCP, TLS and database authentication add round trips on a first request even when the runtime is warm.
- Keep-warm pings. Pinging a function on a timer does not guarantee warmth. AWS states that Lambda terminates execution environments "every few hours" for maintenance, "even for functions that are invoked continuously."
See the glossary index for related runtime terms.