A-Z Popular Blog Coding Search »
Related Guides
Software Design

10 Examples of a Session

 , updated on
A session is an object used to store data and authenticate a series of requests by a user or entity. They are created so that users don't need to provide authentication details such as passwords with each request. Instead, users pass in a session id and other data such as a nonce that is used to authenticate each request. In some cases, sessions are also used to store data that can be accessed when processing each request. The following are common examples of sessions.
Logging on to a website.
Visiting a website
Using an API with a key.
Connecting to a remote server.
Playing a video game that involves an online connection.
Signing in to a mobile app.
Opening a mobile app.
Joining a video conference.
Connecting to a database.
Opening a streaming media app on your television.
Sessions can be created even where you don't logon. For example, a website that creates a session with a cookie when you arrive at a page.

Session Expiry

Sessions are perishable meaning that they expire if they aren't used. Using a session typically extends its life but a maximum duration on a session may also be enforced. Sessions may also be destroyed under other conditions such as the reboot of a server.

Session Data

In many cases, services may store data in a session. This approach tends to be associated with simplistic designs that don't access a database. In the context of complex systems software, storing data in a session may be considered a poor design practice.

Session Management

Sessions management is a term for the secure implementation of sessions. This includes authenticating sessions and cryptographic measures to prevent sessions from being stolen.

Stateless Sessions

The primary purpose of sessions is to provide state so that every request to a service doesn't need to begin from the start again. However, in some cases sessions are implemented as stateless objects that only survive for the duration of a request. Stateless sessions are typically used to hold data for request processing.
Overview: Session
Definition (1)
A perishable object that is used to manage information technology services and communications.
Definition (2)
An object used to authenticate requests and store data over multiple requests to a service by a user or entity.
Sessions are used to implement security models whereby users or other entities only need to be authenticated once. A session is created and users or entities pass in session credentials to authenticate for subsequent requests.
Sessions may also be used to store data temporarily.
Related Concepts


This is the complete list of articles we have written about coding.
Code Refactoring
Code Smell
Complexity Hiding
Deep Magic
Edge Case
Event Processing
Forward Compatibility
IT Artifact
IT Examples
Negative Code
Proof Of Work
Software Design
More ...
If you enjoyed this page, please consider bookmarking Simplicable.


A list of coding considerations and techniques.

Emergence vs Big Design Up Front

The difference between emergence and big-design-up-front.

Deep Magic

An overview of deep magic, a technology term.

Principle Of Least Astonishment

An overview of the Principle Of Least Astonishment.

Pull vs Push

The difference between pull and push technology.

Binary vs Hexadecimal

A comparison of binary and hexadecimal.

End-User Computing

An overview of end-user computing.

Library vs API

The difference between a library and API explained.

Code Reuse

The common types of code reuse.

Code Freeze

The common types of code freeze.

Security vs Privacy

The relationship between security and privacy.


An overview of technology hardening.

Defense In Depth

An overview of defense In depth.

Encryption Examples

A definition of encryption with examples.

Canary Trap

A definition of canary trap with an example.


A definition of honeypot with examples.

Security Through Obscurity

A definition of security through obscurity with an example.


A definition of token with examples.


A definition of backdoor with examples.
The most popular articles on Simplicable in the past day.

New Articles

Recent posts or updates on Simplicable.
Site Map