# Stateless Service

> A service that keeps nothing between calls. So any copy can answer.

**Field:** Software Development  
**Category:** Architecture  
**Also known as:** Stateless Application, Stateless Server, Stateless Process

## Think of it like

It is like a shop clerk who never knows you. You show your ticket each time.

## Definition

A stateless service keeps no memory of past requests inside itself. Each request carries all it needs, like a login token. Anything that must last, such as a cart, is saved in a database or cache outside the service. So any copy of the service can answer any request. That makes it easy to add copies, or to replace one that crashes.

## Example

Jack's shop runs five copies of its web app. Carts live in a shared cache, so the load balancer can send each click to any copy.

## Why it matters

Stateless services grow by just adding copies. A crash loses nothing, because nothing lived there.

## Common mistake

Saving a user's data in the server's memory or on its own disk. It works with one copy, then breaks when a second copy is added.

## Three principles

- **No memory inside.** Each request stands alone.
- **State lives outside.** In a database or cache.
- **Any copy answers.** Easy to grow and replace.

## Related terms

- [Stateful Service](https://learn.benibix.com/term/development/stateful-service)
- [Stateless API](https://learn.benibix.com/term/development/stateless-api)
- [Horizontal Scaling](https://learn.benibix.com/term/development/horizontal-scaling)
- [Load Balancer](https://learn.benibix.com/term/infrastructure/load-balancer)
- [Cache](https://learn.benibix.com/term/development/cache)
- [Session (Web)](https://learn.benibix.com/term/development/session)
- [Scalability](https://learn.benibix.com/term/development/scalability)

## Told apart from

- [Stateless Service vs Stateful Service](https://learn.benibix.com/compare/stateless-service-vs-stateful-service): People think a stateless service keeps no data, and that is not quite right. It keeps none inside itself between requests. The cart or the login lives in a shared store, so any copy can answer. A stateful service keeps that data in its own memory or disk. Each request must reach the one copy that has it.

![Two panels. On the left, stateless: a user's requests can go to any of three app copies, and all three read the user's cart from one shared cache. On the right, stateful: a user's requests must all go to copy B, because only copy B holds that user's game in its memory. Copies A and C cannot help.](https://learn.benibix.com/diagrams/dev6-stateless-stateful.svg)

---

Source: https://learn.benibix.com/term/development/stateless-service
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
