Make systems stateless where possible
Framework question: How do you design interactions in a distributed system to mitigate or withstand failures?
- Risk if not established
- Medium
- Framework verified
- 14 Nov 2026
AWS Well-Architected Framework — REL05-BP06 Make systems stateless where possible
Executive summary
Why this practice matters
Design systems so that no request depends on data held locally on a particular server's disk or memory, either by not needing state or by moving it to an external store. Any server can then be replaced or added at will without affecting availability, and capacity can grow or shrink with demand.
Business impact
- Lets servers be replaced after failure without users losing their session.
- Allows capacity to be added or removed as demand changes.
- Makes it possible to use compute that starts and stops on demand.
- Gives teams more freedom to change and deploy components.
Assign
Accountable and responsible roles
Responsibilities are held separately from roles, so accountability type and typical roles are stated explicitly.
| Responsibility | Accountability type | Typical roles |
|---|---|---|
Design stateless components Identify state, choose external stores and design components to be stateless. Typical roles: Architect, Software Engineer, Architect, Software Engineer | responsible | ArchitectSoftware EngineerArchitect, Software Engineer |
Operate external state stores Run and monitor the databases, caches and file stores that hold offloaded state. Typical roles: Cloud / Platform Engineer, Data Practitioner, Cloud / Platform Engineer, Data Practitioner | responsible | Cloud / Platform EngineerData PractitionerCloud / Platform Engineer, Data Practitioner |
Own the statelessness roadmap Prioritise removal of local state and accept the risk of components that stay stateful. Typical roles: Service Owner, Team Lead / Manager, Service Owner, Team Lead / Manager | accountable | Service OwnerTeam Lead / ManagerService Owner, Team Lead / Manager |
Assessment
Assessment and evidence state
States describe how far the practice has moved from intent to something continuously validated.
- 0
Not Assessed
No documented evaluation of the practice has been performed.
Indicators
- No one has examined which components hold data between requests.
- 1
Not Implemented
The practice is absent or applied only ad hoc.
Indicators
- Session and user data live on individual servers.
- Losing a server loses user sessions.
- 2
Partially Implemented
The practice is applied to some workloads or components, with known gaps.
Indicators
- Some components offload session data.
- Sticky sessions or local state remain in key paths.
- 3
Implemented
The practice is applied consistently across defined scope, with evidence.
Indicators
- Stateful components are identified and state is held in external stores.
- Any instance can serve any request.
- 4
Continuously Validated
The practice is regularly tested and improved from measured results.
Indicators
- Instance replacement and scaling are exercised routinely with no user impact.
- Remaining stateful components are reviewed and reduced over time.
Assessment dimensions
State inventory
Practice-specificAbsent · Partial · Operational and verified
Session offloading
Practice-specificAbsent · Partial · Operational and verified
Data and secret separation
Practice-specificAbsent · Partial · Operational and verified
Instance interchangeability
Practice-specificAbsent · Partial · Operational and verified
Caution
Do not award maturity for running behind a load balancer alone. Check that session and user data live outside the servers, that no sticky sessions remain, and that instances have been replaced without user impact.
Standard
What you should be able to demonstrate
Statements a reviewer should be able to confirm from evidence, not from intent.
- Stateful components have been identified and the reasons for their state understood.
- Session data is held in an external database, cache or file store, not on the server.
- User data and secrets are managed separately from application logic.
- Large unstructured data is retrieved from storage when needed rather than kept in memory.
- Any instance can serve any request, and instances are replaced without user impact.
Trade-offs to hold in view
- External state stores add latency and become dependencies that must be resilient.
- Redesigning stateful components can be a significant effort.
- Some workloads need state close to compute for performance, so statelessness applies only where possible.
Assess
Questions to ask
Each question exposes the difference between an intention and an operating practice.
- discovery
Which components keep data between requests on local disk or in memory?
Identifies stateful components that limit replacement and scaling.
Usually asked by: Architect, Software Engineer
- challenge
If we terminated a server mid-session right now, what would its users lose?
Tests whether session state really survives instance loss.
Usually asked by: SRE / Reliability Engineer, Software Engineer
- evidence
Can we show a recent instance replacement or scale-in event that caused no user impact?
Requires operating evidence that instances are interchangeable.
Usually asked by: Operations Engineer, SRE / Reliability Engineer
- executive
Is server state limiting how quickly we can scale or recover the service?
Connects statelessness to agility and resilience.
Usually asked by: Service Owner, Technology Executive
Evidence
Required and expected evidence
Reusable evidence definitions held once in the evidence library and referenced by every practice that relies on them. Each links to what good evidence looks like and to worked examples.
Technical Design / Solution Specification
A controlled technical design record describing how an agreed set of requirements and architecture decisions are realised in components, interfaces, data structures, security, reliability, operational controls and deployment behaviour.
Shows which components hold state, where session and user data are stored, and how instances can be replaced.
Minimum expected content
- Scope, purpose, status, owner and affected workload/service
- Traceability to material stakeholder, system and non-functional requirements
- Architecture overview and major components with responsibilities
- Significant architecture/design decisions referenced through ADR/DDR records rather than silently embedded
- External and internal interfaces, APIs, protocols or service contracts where material
- Data model, data flows, ownership and persistence choices where material
- Security design including identity, trust boundaries, sensitive data and key controls
- Reliability, scaling, recovery and failure-behaviour design mapped to applicable NFRs
- Operational design covering observability, logging, alerting, support and administrative needs
- Deployment, configuration, migration and rollback approach where material
- Dependencies, assumptions, technical constraints and third-party/service dependencies
- Applicable design standards/reference architectures plus justified exceptions
- Verification and testing approach for material design assumptions
- Relevant diagrams and supporting technical artefacts
- Reviewers, approvals or technical-governance record appropriate to the decision scope
Anti-patterns
- A technology-stack inventory presented as a complete solution design
- A document produced after implementation that merely describes what happened
- Requirements copied into the design without explaining how the solution satisfies them
- Fixed product or cloud-service choices with no traceability to a decision or constraint
- Security, recovery, observability or operational support omitted because they are assumed to be handled elsewhere
- API endpoints listed without contracts, ownership, versioning or compatibility expectations
- Architecture decisions duplicated inside the specification and allowed to diverge from ADR/DDR records
- Generic diagrams or reference architectures copied without showing workload-specific differences
- A stale design that no longer matches production but is still used as assurance evidence
Review: Create or materially update before implementation of significant new workloads or architecture changes. Keep current where design changes affect interfaces, data, security, reliability, operational behaviour or material requirements.
Data Access & Storage Efficiency Assessment
Assessment of data characteristics and access patterns used to select efficient storage, caching, partitioning, compression and access architectures.
Shows the external stores chosen for session, user and large object data and how they are accessed.
Minimum expected content
- Dataset/workload scope
- Data type
- Growth pattern
- Durability requirement
- Read/write pattern
- Access frequency
- Burst characteristics
- Candidate storage/access patterns
- Compression/partitioning/caching options
- Resource implications
- Selected architecture
- Review trigger
Anti-patterns
- One storage tier for all data
- Access pattern assumed static
- Burst capacity provisioned permanently
- No compression where supported
- Database/storage choice based only on familiarity
Review: Review when data volume, access pattern, retention requirement or storage technology changes materially.
Diagnosis
Common evidence gaps
Sticky sessions
Users are tied to a single server, so losing it ends their session.
State in memory or local disk
Data needed by later requests is kept on the server that handled the first one.
Secrets in code
Application code holds secrets that should be in a central, secure store.
Unexamined state
Nobody has listed which components are stateful or why.
Implementation
Implementation guidance
Find where state lives
Identify the components that keep data between requests, and assess what moving to a stateless design would involve.
Separate user data from logic
Move user profiles, identity data and secrets out of application code into dedicated services or stores.
Offload session data
Store session data in an external database, cache or shared file system so it survives the loss of any server.
Store large objects externally
Keep images, documents and similar data in object storage and fetch them when needed.
Design once state is placed
After deciding which state must persist and where, design the remaining components to be stateless and scale them horizontally.
Measure
Measurements
- Share of components that hold no local state between requests
- User sessions lost during instance replacement or scale-in
- Time to add or remove capacity
- Number of components still relying on sticky sessions
Related
Outcomes and practices
Business outcomes
Practices