HeadlinesBriefing favicon HeadlinesBriefing.com

RePlaya: Single‑Stream Browser Replay Powered by S2

Hacker News •
×

RePlaya, a self‑hosted browser session replay built on S2, lets developers store each session as a single S2 stream. The approach removes the need for a separate database, message bus, or object store, letting a single primitive handle recording, live tailing, and playback. Founders of s2.dev highlight the simplicity of this model.

Each rrweb event streams into the session’s S2 record via S2’s Producer API, which batches with backpressure and acknowledges durability. Large snapshots split across binary records reassemble on read, while timestamps keep a client‑require timeline. Naming streams with inverted timestamps gives newest‑first ordering, so the dashboard lists live sessions without an extra index database system.

Live tailing is enabled by opening an S2 read session that streams new records to the browser over SSE. A single stream powers both the historical scrub and the live edge, eliminating the ingest‑flush delay common in other backends. Security rests on the recorder’s write surface, while read APIs stay private behind an access layer.

To run RePlaya, users set an S2_ACCESS_TOKEN and basin in .env.local, then start the dev server. For production, the collector routes remain public while the dashboard and read APIs are secured behind SSO or a VPN. The tool’s minimal footprint and single‑stream architecture make it attractive for teams needing reliable replay without extra infra today.