Skip to main content

Overview

The per-session pattern covers use cases with many individual streams, typically with one writer and one reader per stream. This is ideal for high-cardinality scenarios where you need to track isolated streams of activity.

Architecture

Common use cases include browser session replay, real-time log and telemetry observability (we even have an OpenTelemetry collector), chat or LLM streaming response durability, and IoT device data collection.

Why S2 for sessions?

S2 has truly unlimited streams - you can create one stream per function run, browser instance, website visit, or any other high-cardinality identifier you need. Streams are created automatically on first append or read, so there’s no pre-provisioning required. You can configure streams with optional garbage collection policies like deletion when empty or age-based record retention. S2’s granular access controls work at the individual stream level, giving you fine-grained permissions for each session.