Change Data Capture
Change Data Capture (CDC) is a pattern that streams row-level inserts, updates, and deletes from a database log or trigger into downstream consumers. CDC feeds search indexes, caches, analytics, and read-model APIs so clients see fresh data without polling heavy source tables on every request.
Technical Architecture & Deep-Dive
CDC tools read the database transaction log or use logical replication slots to emit ordered change events. Each event carries primary keys, before and after images, and timestamps.
HTTP APIs rarely expose CDC directly, but webhook and queue handlers at the edge ingest these events, normalize payloads, and invalidate CDN cache keys or update edge KV stores. That keeps public JSON APIs slim while still reflecting backend changes within seconds.
Key Architectural Benefits
Implement Change Data Capture at the Edge
Deploy lightweight API aggregation, edge caching, and secret injection in minutes without Docker containers or complex servers.
Frequently Asked Questions
Q:Is CDC the same as database triggers posting webhooks?
Triggers can emit events, but CDC usually taps replication logs for lower overhead and more complete ordering guarantees.
Related Architecture Concepts
A read model API exposes JSON documents tailored for fast reads: denormalized fields, precomputed aggregates, and mobile-friendly shapes stored separately from the transactional write model. Updates arrive through jobs, CDC, or event handlers so clients fetch slim, stable contracts without joining many upstream services per request.
A webhook is an HTTP callback: when an event occurs in one system, it sends an HTTP POST with event data to a URL you register. Instead of polling an API repeatedly for changes, your application receives updates in real time, such as payment succeeded or ticket created events.
Response normalization is transforming API responses from different sources into a single consistent structure. It standardizes field names, date formats, data types, and missing value handling so client code can rely on one predictable shape regardless of the upstream provider.