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.
In more detail
The main state lives on the server, so the server can end a session by deleting or rotating its handle without touching the user record. Sessions suit browsers; services that do not share a cookie jar usually use tokens instead.
Examples
In the browser: sessionStorage uses the word differently: it lasts for the life of one browser tab.In the course, the caller's identity comes from the session or a verified token and never from a field the client chose.Related terms
- cookie — A small named value a server asks a browser to store and send back automatically on later matching requests.
- bearer token — A token that grants access to whoever presents it, sent as Authorization: Bearer <token>, without any further proof of identity.
- 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.
- sessionStorage — Browser storage like localStorage, but scoped to a single tab and cleared when that tab is closed.
- HttpOnly — A cookie attribute that stops scripts running in the page from reading the cookie, while the browser still sends it on requests.
- access token — A generated string that proves who you are to a service, used instead of a password and revocable on its own.
- TTL — How long a stored item, such as a session, token or cache entry, stays valid before it expires.
- session cookie — The cookie that proves a user is signed in, carrying a session ID or a signed or encrypted token.
- authentication — Establishing who a request represents, for example by checking a password, a session cookie or a signed token.
- cross-site request forgery — An attack where another website makes the victim's browser send a request to your site, and the browser's cookie makes it look genuine.
- key-value store — A database that stores each item under a unique key and fetches it by that key, very quickly and at large scale.
- sticky session — A load balancer setting that sends every request from one client to the same server copy, usually because that copy holds its state in memory.
- read your writes — A guarantee that after you make a change, your own later reads will include it.
Taught in
- Cookies And CORS — Modern API Architecture: REST, GraphQL & gRPC
- The REST Constraints — Modern API Architecture: REST, GraphQL & gRPC
- Basic Auth, Tokens And Sessions — Modern API Architecture: REST, GraphQL & gRPC
- Client Storage Paradigms: Cookies, Storage Tradeoffs — Frontend Architecture & Web Platform
- Type-Safe RPC Architectures: tRPC & Procedures — Production Full-Stack Engineering
- Session Architecture: HTTP-Only Cookies vs Tokens — Production Full-Stack Engineering
- Multi-Tenant Identity: Tenant Isolation & Middleware — Production Full-Stack Engineering
- Server Action Security: Zod Validation & Auth Gates — Next.js 15 & Modern App Router Architecture
- Data Cache: Cross-Request Persistence & Fetch Tags — Next.js 15 & Modern App Router Architecture
- Edge Middleware: Auth Verification & Route Matchers — Next.js 15 & Modern App Router Architecture
- Session Management: Secure Cookies & Token Validation — Next.js 15 & Modern App Router Architecture
- Authentication Versus Authorisation — Application Security & Threat Modeling for Engineers
- Cross-Site Request Forgery — Application Security & Threat Modeling for Engineers
- Broken Object Level Authorization — Application Security & Threat Modeling for Engineers
- What A Design Is For, And How To Run A Design Discussion — Scalable System Design & Distributed Architecture
- The Storage Decision: Key Value, Search And Blob — Scalable System Design & Distributed Architecture
- Replication, Failover And Leader Election — Scalable System Design & Distributed Architecture
- Eventual Consistency And What It Costs A Product — Scalable System Design & Distributed Architecture
- Load Balancing And The Failure Modes It Introduces — Scalable System Design & Distributed Architecture
- Worked Design One: Scaling The Ticket Booking System — Scalable System Design & Distributed Architecture