techdiagrams.net
← All templates

CDC replication backbone

Log-based change data capture streams every row change out of the OLTP database — feeding search, caches and the warehouse without touching app code.

Open in editor — free, no login Download JSON
DERIVED VIEWS — ALL REBUILDABLEtxn: rows + outboxWALcheck schemachange eventsupsert docsevict keysappend factspoisonOrder Servicewrites rows + outboxOLTP PostgresWAL = changelogCDC Connectortails WAL · logical decodingSchema Registrycompatibility gateChange Streamper-table topics · keyed by PKSearch Indexrebuilt from streamCache Invalidationevict on changeStreaming ETL → Warehousetransform in-flightDead Lettersunparseable changeswhy CDC beats dual-writes: the app writes ONCE(its own database). everything downstream derivesfrom the WAL — which can't disagree with the data,because it IS the data.

What this design does

The database's write-ahead log is already a perfect changelog — CDC just reads it. No dual writes, no polling, no app changes: every committed row change becomes an event, validated against a schema registry, fanned out to whatever needs fresh data. The outbox table rides the same pipe for app-level intent events.

The patterns it composes

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