Session
A way to maintain state across multiple HTTP requests. The server stores data about a user and gives them a session ID (usually in a cookie).
What is Session?
A way to maintain state across multiple HTTP requests. The server stores data about a user and gives them a session ID (usually in a cookie).
Session is a foundational concept that sits in the Core Fundamentals area of system design. Engineers reach for it whenever they need to reason about real-world trade-offs in that space — not just for textbook correctness, but because real production systems at companies like Netflix, Amazon, and Google make these decisions every day.
If you want to go deeper than this definition — with diagrams, code, and a quiz to lock it in — work through the "Session" lesson linked below. It walks through the why, the mechanism, the trade-offs, and how the giants actually use it in production.
Learn Session in depth
Full interactive lesson with diagrams, code examples, real-world references, and a quiz.
Open the Session lessonRelated lessons
Lessons that touch on Session as part of a larger topic.
Monotonic Reads
Once you have seen a value, you never see an older one, the minimum useful consistency guarantee
advanced · consistency models
Session Windows
Dynamic windows based on activity gaps, group events by user sessions with configurable timeouts
advanced · stream batch processing
Session Affinity
The broader concept behind sticky sessions, soft preferences vs. Hard pinning
foundation · load balancing proxies
Cookie-Based Sessions
Using HTTP cookies to maintain user state across requests, the traditional session model
intermediate · security architecture
JWT Sessions
Using JWTs as session tokens: the trade-offs, pitfalls, and best practices
intermediate · security architecture
See also
Related glossary terms you might want to look up next.
Stateless
A system where each request contains all the information needed to process it. The server doesn't remember previous requests. Easier to scale horizontally.
Stateful
A system that remembers previous interactions. The server keeps track of client state between requests, making it harder to scale but sometimes necessary.
JWT
JSON Web Token: a compact, self-contained token for transmitting claims between parties. The server can verify it without a database lookup.