Warm pools

Hot containers for serverless latency and cold starts

Warm pools can keep selected serverless functions ready between calls so a reuse invoke often skips much of the cold-bootstrap work—measure p95/p99 on your handlers rather than assuming a fixed number.

Last updated: 2026-06-28

Direct answer

Hot containers for serverless latency and cold starts. When hot lambdas are enabled, the Docker path can keep a small pool of ready runners per function. Before reuse, a quick health check confirms the process is still alive; idle containers age out on configurable timers so you are not leaking memory forever.

When it fits

  • HTTP routes with steady traffic where tail latency is user-visible
  • Agent tool loops that run under tight timeouts

Tradeoffs

  • A warm pool keeps ready slots for repeat traffic: a previously cold function returns faster on the second and subsequent calls. The very first call after a deploy or after idle timeout still takes a cold path.
  • Hot containers are not a zero-cold-start guarantee. If you need the absolute first-call latency to be fast, design the handler for fast init: lazy-load heavy clients, avoid large startup I/O, measure p99 under realistic traffic before declaring the problem solved.
  • Edge-only models optimize for geography, not for long-lived language runtimes with heavy imports — a different trade-off entirely.

When cold starts hurt

Interactive flows and tight-SLA endpoints feel every sporadic initialization: dependency imports, JIT warmup, and connection-pool setup all land on whichever request arrives cold.

Autoscaling from zero saves money, but it injects latency variance that shows up in user-visible tails long before it shows up in averages.

Hot containers reduce cold starts — they do not eliminate them

A warm pool keeps ready slots for repeat traffic: a previously cold function returns faster on the second and subsequent calls. The very first call after a deploy or after idle timeout still takes a cold path.

Hot containers are not a zero-cold-start guarantee. If you need the absolute first-call latency to be fast, design the handler for fast init: lazy-load heavy clients, avoid large startup I/O, measure p99 under realistic traffic before declaring the problem solved.

Edge-only models optimize for geography, not for long-lived language runtimes with heavy imports — a different trade-off entirely.

How Inquir approaches warmth

When hot lambdas are enabled, the Docker path can keep a small pool of ready runners per function. Before reuse, a quick health check confirms the process is still alive; idle containers age out on configurable timers so you are not leaking memory forever.

Each warm slot is still its own container for that function. If you need the strictest hygiene between requests, you can force dispose-after-use so every call starts fresh—at the cost of cold-start time.

Warm pools matter most on gateway HTTP routes and streaming responses where tail latency is user-visible—see the API gateway feature page for routing and auth context.

Controls for tuning warm pools

Tuning

Pool depth, idle timeouts, invocations per container, and dispose-after-use are all exposed as environment-driven settings on the Node server—tune them against real traffic instead of defaults.

Observability

Execution traces separate init time from handler time, and the pool reports health-check latency—so you can see exactly where warmth pays off.

Cost

Warmth trades idle Docker capacity for tail latency—validate the exchange against your own traffic bands before scaling the pool up.

How to tune warm containers in Inquir Compute

1

Measure

Capture p95/p99 with realistic auth and payload sizes.

2

Adjust

Align pool sizes with traffic bands instead of guessing.

3

Review

Revisit after major dependency upgrades—warmth does not fix slow imports.

How to think about latency

Split your measurements into connect, init, and handler phases when profiling—each phase points at a different fix.

metrics-notes.js
// p50 alone hides cold tails — track p99 alongside error rates after deploys.

Where hot containers fit

When this works

  • HTTP routes with steady traffic where tail latency is user-visible
  • Agent tool loops that run under tight timeouts

When to skip it

  • Rarely invoked batch jobs where paying nothing for idle capacity matters more than latency

FAQ

Is warmth guaranteed?

No. Warm pools are a best-effort capacity strategy, and load tests in your own environment remain the source of truth for how often a call actually lands on a warm slot.

Does this replace profiling?

No. Slow handler code stays slow—warm pools only remove one class of startup overhead, so profiling still pays off.

What about streaming responses from the gateway?

The Docker orchestrator’s streaming path requires hot lambdas to be enabled—if that setting is off, the stream errors immediately instead of leaving clients half-connected. Warm pools still help tail latency once streaming is enabled; they do not guarantee a warm slot on every first call.