Where state lives is the most important architectural choice.
Stateless vs Stateful: where state lives is the most important architectural choice
make the invisible limits visible
S3 round-trip slower than local disk.
A stateless service holds no per-request memory between calls; any server can answer any request. State must live somewhere — usually a database, cache, or token. Stateless app tier + stateful data tier is the canonical web architecture.
Hidden state kills horizontal scaling. In-process caches, sticky sessions, file uploads on local disk, and locks all bind a request to a specific machine.
Externalize: sessions in Redis or signed JWTs, files in S3, locks in a distributed locker, caches in a shared layer.
Stateful services (databases, brokers) still exist; we accept them as bounded and run them carefully (replicas, snapshots, careful failover).
Existing API stores upload temp files on local disk.