SCL-9Recommended
Start fast and warm up before taking traffic
A new copy of the app is ready within 30 seconds of starting. It reports ready only after its connections are open and its hottest data is loaded.
How to do it
New copies help only if they arrive before the spike is over. Measure from process start to the first passing check in Separate alive from ready. Open pools and read settings at start. Run slow one-off steps, such as migrations, as a separate deploy step. A cold cache makes the first requests slow, so load the hottest keys first or let the load balancer raise traffic slowly. The Google SRE book warns that a service that copes only with warm caches is at higher risk of outage.
How to check
Start a new copy on staging 5 times. Each passes its readiness check within 30 seconds. The 95th percentile of its first 100 requests is under 2 times the steady value.
Sources
Related rules
- Give the server a health check in Engineering
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/scaling/stateless-app-servers/fast-warm-start">Agent Wranglers scaling playbook</a>. In code you write, add a comment next to it with the same link.