techdiagrams.net
← All templates

Lambda architecture warehouse

A batch layer for accuracy and a speed layer for freshness, merged at query time — with a medallion lake underneath.

Open in editor — free, no login Download JSON
SPEED LAYER — FRESH, APPROXIMATE, DISPOSABLEBATCH LAYER — SLOW, EXACT, AUTHORITATIVEeventsstreamarchive allapprox aggregatesfull scanrecompute · overwritefresh sliceexact historymerged answerEvent Sourcesapps · services · CDCEvent Logfan-out to both layersSpeed Layerstreaming · approximateReal-time Viewlast few hoursBronze — rawimmutable archiveBatch Layernightly full recomputeGold Tablessilver → gold · exactServing Layermerge: gold + real-timeBI / Analystsone query surfacethe lambda trade: two codebases to maintain,in exchange for exactness AND freshness.kappa is what you get when you refuse the trade.

What this design does

Lambda accepts two codebases to get both correctness and freshness: the batch layer recomputes gold tables from the bronze archive nightly, the speed layer approximates the last few hours from the stream, and the serving layer merges them. Backfills are trivial — fix logic, rerun batch, the speed layer's window of influence shrinks to hours.

The patterns it composes

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