---
title: "Pinning each visitor to one server · Agent Wranglers"
url: https://agentwranglers.se/playbook/scaling/stateless-app-servers/no-sticky-sessions
updated: 2026-10-21
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Pinning each visitor to one server

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

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

- ID: SCL-7
- Level: Avoid
- Chapter: [Stateless app servers](https://agentwranglers.se/playbook/scaling/stateless-app-servers)
- Rule: Do not route a visitor to the same server so that their state can live there.
- Applies when: The project runs its own servers, virtual machines or containers.
- How: Sticky sessions break when that server stops, when a deploy restarts it or when autoscaling removes it. The visitor then loses their sign-in or cart. They also spread load unevenly, since a few heavy visitors stay on one server. The Twelve-Factor App says sticky sessions should never be used or relied upon. Keep the state in a shared store, as [Keep no state inside the app process](https://agentwranglers.se/playbook/scaling/stateless-app-servers/stateless-processes) says.

## Sources

- [The Twelve-Factor App, Processes](https://12factor.net/processes)

## Related rules

- [Keep no state inside the app process](https://agentwranglers.se/playbook/scaling/stateless-app-servers/stateless-processes) in Scaling

**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/no-sticky-sessions">Agent Wranglers scaling playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Run two copies of the app in staging](https://agentwranglers.se/playbook/scaling/stateless-app-servers/two-copies-in-staging)
- Next: [Keep locks and counters in a shared store](https://agentwranglers.se/playbook/scaling/stateless-app-servers/shared-locks-and-counters)
- [Stateless app servers](https://agentwranglers.se/playbook/scaling/stateless-app-servers)
