stateless
Describes a component or service that keeps no data from one request to the next, so each request carries everything needed to handle it.
In more detail
Stateless does not mean the service forgets data: sessions and records still live in a database or store, and a cookie or token can point to them. It means any instance behind a load balancer can handle the next request, so the service scales out without coordination. Statelessness is also one of the constraints of REST.
Examples
The course's retry router picks the next topic from the record's attempt counter alone.A Spring singleton service should hold only final references to other beans, never per-request data.Related terms
- REST — An architectural style for networked software built on named resources, representations of their state, stateless requests and a uniform interface.
- session — A record the server keeps about a logged-in caller, found on each request through a handle the client presents, usually in a cookie.
- load balancer — A server that spreads incoming requests across several copies of a service so no single copy is overloaded.
- horizontal scaling — Handling more load by running more copies of a process, often on more machines, rather than making one machine bigger.
- Auto Scaling group — An EC2 feature that keeps a desired number of identical instances running, replacing failed ones and adding or removing them as load changes.
- object storage — Cloud storage that keeps whole files, called objects, in buckets and serves them over the network, such as Amazon S3.
- attempt counter — A number stored in a record that counts how many times processing it has been tried.
- deterministic — Always producing the same result from the same inputs, with nothing left to chance or timing.
- bean scope — The rule for how many instances of a Spring bean exist: one shared singleton by default, or a new one per use, request or session.
- mutable state — Data that can change after it is created, such as a field that is reassigned or a list that is added to.
Taught in
- The Request And The Response — AI Engineering: LLM Apps, RAG & Agents
- Memory And Compaction — AI Engineering: LLM Apps, RAG & Agents
- What MCP Is — AI Engineering: LLM Apps, RAG & Agents
- Build An MCP Server — AI Engineering: LLM Apps, RAG & Agents
- Connect An Agent To MCP — AI Engineering: LLM Apps, RAG & Agents
- Capstone: The Tasks Assistant — AI Engineering: LLM Apps, RAG & Agents
- The REST Constraints — Modern API Architecture: REST, GraphQL & gRPC
- The Public Subnet That Was Not — AWS Certified Cloud Practitioner (CLF-C02) Exam Prep
- Confusable Services Sprint: One Clue Each — AWS Certified Cloud Practitioner (CLF-C02) Exam Prep
- The Network As A Control: CIDR, Routes, ACLs And Security Groups — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- The Full Mock And Your Review Plan — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Elasticity and Scale — Cloud Infrastructure & Hyperscaler Architecture
- Auto Scaling Groups — Cloud Infrastructure & Hyperscaler Architecture
- Blank Names After Every Deploy — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Dependency Injection And The IoC Container — Modern Java: Virtual Threads & High-Throughput Services
- Retries With Backoff Topics — Apache Kafka & Event Streaming
References
- Roy Fielding: Representational State Transfer (dissertation, chapter 5)
- AWS Well-Architected Reliability pillar REL05-BP06: make systems stateless where possible
- Microsoft Azure: retry pattern
- Spring Framework: Bean Scopes