techdiagrams.net
← All templates

Real-time analytics (Kappa architecture)

One stream, one processor, one serving store — the log is the source of truth, and reprocessing is just replaying it from offset zero.

Open in editor — free, no login Download JSON
THE ONLY PIPELINE — NO BATCH TWIN TO DRIFTeventsappendconsume · offset-trackedwindow aggregatestoo late for windowqueryREPLAY from offset 0 (new version)Product Appsweb · mobile · backendEvent Gatewayvalidate + stamp event-timeEvent Logretained 30d · partitionedStreaming Jobwindows + watermarksLate-Event Parkingafter watermark → side outputServing Storeupsert by (window, key)Live Dashboardsp95, funnels, countskappa's bet: one codebase, reprocessing by replay.the cost: the log must retain enough history,and the sink must be idempotent — or replaysdouble-count everything.

What this design does

Kappa deletes the batch layer: every event lives forever in the log, a single streaming job computes windowed aggregates with watermarks for late data, and an idempotent sink makes replays safe. Need to fix a bug or add a metric? Deploy the new job, replay the log, atomically swap the serving table. No second codebase, no batch/speed drift.

The patterns it composes

Import it, attach your own numbers, and verify the design against failures — or read the engineering notes.