Execute the app as one or more stateless processes
The app is executed in the execution environment as one or more processes.
Twelve-factor processes are stateless and share-nothing. Any data that needs to persist must be stored in a stateful backing service, typically a database.
The memory space or filesystem of the process can be used as a brief, single-transaction cache. Never assume that data will be there later. Future requests may be served by a different process, but even a single process could lose local state.
Don't rely on 'sticky sessions' where requests from a visitor is routed to the same process. Instead store the data you need.
[[12factor]] [[architecture]] [[infrastructure]] [[ops]]