---
title: "Stateless app servers · Agent Wranglers"
url: https://agentwranglers.se/playbook/scaling/stateless-app-servers
updated: 2026-10-21
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Stateless app servers

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Scaling](https://agentwranglers.se/playbook/scaling.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers). Updated 2026-10-21.

> Any copy of the app can serve any request, start fast and stop without losing work. Then you can add or remove copies at any time.

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/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">Agent Wranglers scaling playbook</a>`. In code you write, add a comment next to it with the same link.

## Required

- SCL-8 [Keep locks and counters in a shared store](https://agentwranglers.se/playbook/scaling/stateless-app-servers/shared-locks-and-counters): Keep every lock, counter and "already done" set that must hold across requests in a store all copies see. Never keep it in process memory.

## Recommended

- SCL-6 [Run two copies of the app in staging](https://agentwranglers.se/playbook/scaling/stateless-app-servers/two-copies-in-staging): Run at least two copies of the app behind the load balancer in staging, with no sticky sessions. State hidden in one process then fails in tests, not in production.
- SCL-9 [Start fast and warm up before taking traffic](https://agentwranglers.se/playbook/scaling/stateless-app-servers/fast-warm-start): 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.
- SCL-10 [Run web and worker processes apart](https://agentwranglers.se/playbook/scaling/stateless-app-servers/web-and-worker-processes): Run request handling and background work as separate process types from the same build, so each scales on its own.
- SCL-37 [Keep no state inside the app process](https://agentwranglers.se/playbook/scaling/stateless-app-servers/stateless-processes): Keep sessions, uploads and pending jobs outside the app process and its local disk. Any copy of the app can then stop or start without losing them.

## Avoid

- SCL-7 [Pinning each visitor to one server](https://agentwranglers.se/playbook/scaling/stateless-app-servers/no-sticky-sessions): Do not route a visitor to the same server so that their state can live there.

- Previous: [Measure before you scale](https://agentwranglers.se/playbook/scaling/measure-before-you-scale)
- Next: [Caching](https://agentwranglers.se/playbook/scaling/caching)
- [All chapters](https://agentwranglers.se/playbook/scaling)
