Free book · 200 pages
How Session Replay Service Works
A free book about the architecture of session replay — from the recorder that captures a visitor's every move to the player that replays it all back. Written by the LogNroll team from real source code, with a small bookstore's story woven through.
Read online
HTML — opens in your browser, works offline, print-friendly
Download PDF
Ready for print or your favorite PDF reader
Download EPUB
For e-readers, tablets and phones
Free forever — HTML, PDF and EPUB under CC BY 4.0. Share it with your team.
Why we wrote it
Most teams only ever see the play button
Session replay is everywhere now, but almost nobody explains what actually happens underneath. Between the moment a user's browser captures an event and the moment you press play in the dashboard lies a full pipeline — a recorder, an ingestion gateway, a message bus, an archiving worker, a processor, and a player that rebuilds the page from data. This book walks that pipeline end to end, using LogNroll's real architecture as the reference implementation.
Every mechanism is grounded in real code: the recorder's batch sizes and worker, the protobuf schema, the receiver's anti-crawler defenses, the worker's lock-and-archive dance, the 30-day retention lifecycle, the heatmap and error processors, and the player's canvas overlays. And because the source is a living platform, the book is written with its future in mind — Chapter 20 is an honest roadmap of where the architecture (and the industry) is heading.
What's inside
21 chapters in six parts, plus reference appendices
Part I · The Why and the World
What replay is (and is not), why the browser became the last dark room, and the story that starts it all.
- ›Ch. 1 — What Is a Session Replay Service — and Why It Exists
- ›Ch. 2 — The Bookstore That Couldn’t See Its Customers
- ›Ch. 3 — Anatomy of a Session
Part II · Recording
How a recorder captures every click, scroll, mutation, console line and network call — and gets the data out without breaking the page.
- ›Ch. 4 — The Recorder SDK: From Snippet to Session
- ›Ch. 5 — Capturing a User’s World
- ›Ch. 6 — Protobuf: The Wire Language of Replay
- ›Ch. 7 — Privacy, Masking, and Consent on the Client
- ›Ch. 8 — Getting the Data Out: Batching and Transport
Part III · Ingestion, Bus, and Storage
From POST to archive: the receiver, the message bus where sessions wait, and the ACTIVE → IDLE → FINISHED → REMOVED lifecycle.
- ›Ch. 9 — The Receiver: First Touch of Every Event
- ›Ch. 10 — The Message Bus: NATS JetStream
- ›Ch. 11 — The Worker and the Cold Archive
- ›Ch. 12 — Storage, Lifecycle, and the Cost of Memory
Part IV · Making Sessions Useful
Errors, click heatmaps, scroll heat and network analysis — plus the jobs and uptime alerts that keep a replay platform honest.
- ›Ch. 13 — The Processor: Turning Replay into Insight
- ›Ch. 14 — Background Jobs, Monitoring, and Alerts
Part V · Replay and the Product
How a session becomes a play button: auth, binary protobuf serving, and the player that rebuilds a page and replays time.
- ›Ch. 15 — Serving a Session: The Player API
- ›Ch. 16 — The Player: Reconstructing Time
- ›Ch. 17 — The Product Around the Replay
Part VI · Running It for Real
Multi-tenancy, scale and cost math, an honest roadmap, and a fair build-vs-buy framework for engineering teams.
- ›Ch. 18 — Operating a Session Replay Service
- ›Ch. 19 — Performance Math and Cost Engineering
- ›Ch. 20 — Where This Is Going: Future Improvements
- ›Ch. 21 — Epilogue — and Should You Build or Buy?
Plus five appendices: the full LogPoint protobuf contract, the storage and collections reference, a configuration reference, a glossary, and further reading.
The Bookstore That Couldn't See Its Customers
Candlewood Books is a small independent online bookstore. In the spring of 2026 its checkout starts failing — orders charged twice, buttons that do nothing, a furious library client threatening to leave — and nobody can reproduce a single bug. The story of how a seven-person team learns to see its customers runs through every part of this book, from the first replay watched together to the epilogue two years later.
The story is a fictional composite drawn from real patterns we see every day; the architecture it teaches is real.
Privacy by design
A whole chapter on masking, sanitizers, consent and retention — because replay sees everything unless you design it not to.
A story, not just specs
Candlewood Books, a small bookstore drowning in checkout complaints, runs through the book as its story thread.
Built for the future
Every chapter is written from real source code with the platform’s future in mind — Chapter 20 is an honest improvement roadmap.
Reference appendices
The full protobuf contract, the storage and configuration reference, event payloads, a glossary and further reading.
Start reading — it's free
Read it online, download the PDF or EPUB, and send it to the colleague who keeps asking "what actually happened on that checkout?"
New to LogNroll? Start free at app.lognroll.com and watch your first session in minutes.