{"post":{"slug":"change-data-capture-explained-2026","title":"Change Data Capture Explained in 2026: How CDC Works","excerpt":"Change data capture streams database changes to other systems the moment they commit, without polling. Here is how log-based CDC works and where it fits in a 2026 data stack.","category":"code","date":"July 31, 2026","author":"ByteLedger Team","content":"<span class=\"dropcap\">C</span>hange data capture, or CDC, streams every insert, update, and delete from a database to other systems the instant each change commits. Instead of polling a table on a schedule and diffing the results, a CDC connector reads the database's own transaction log, the durable record every engine already writes before it touches a table, and turns each committed change into a structured event. That single design choice is why CDC scales cleanly where polling does not: it adds almost no load to the source, and it never misses a delete or a rapid update between polling windows. Nearly every downstream system in a modern data stack — a search index, a cache, a warehouse, an analytics store — ends up needing the same feed of changes, which is why CDC has become foundational plumbing rather than a specialized tool built for one integration.\n\n## What changed in 2026\n\n- **CDC became a built-in cloud database feature.** Several managed database services now expose a native change stream without requiring a separate connector to be deployed and operated.\n- **Schema registries became standard practice.** Pairing CDC output with a schema registry catches breaking changes before they reach downstream consumers, instead of failing silently inside a subscriber pipeline.\n- **CDC feeding lakehouse tables matured.** Streaming inserts, updates, and deletes directly into open table formats such as Iceberg and Delta Lake became a common ingestion pattern, replacing nightly full-table reloads.\n- **Connector operational tooling improved.** Managed Kafka Connect and Debezium offerings cut the operational burden that used to make self-hosting a CDC pipeline a significant undertaking on its own.\n\n## How it works\n\nEvery write to a relational database first lands in a transaction log, the write-ahead log in Postgres or the binlog in MySQL, because the engine needs it for durability and replication regardless of CDC. A log-based connector such as Debezium tails that log directly, not the tables, and emits an event per committed change carrying the operation type and the before and after row images:\n\n```json\n{\n  \"op\": \"u\",\n  \"before\": { \"id\": 42, \"status\": \"pending\" },\n  \"after\": { \"id\": 42, \"status\": \"paid\" },\n  \"ts_ms\": 1732900000000\n}\n```\n\nThose events publish to a stream, most commonly Kafka, where any number of downstream consumers can subscribe independently: a search index, a cache invalidator, a data warehouse loader, or an audit log. Because each consumer reads from its own position in the stream, adding a new one never requires touching the source database or any existing subscriber, which is the main structural advantage CDC has over a bespoke integration built for a single downstream system.\n\n## Where CDC fits in a 2026 stack\n\n| Tool | Source databases | Notes |\n| --- | --- | --- |\n| Debezium | Postgres, MySQL, MongoDB, SQL Server, Oracle | Open source, runs on Kafka Connect, the most widely deployed option |\n| AWS DMS | Most major engines | Managed, common for both migrations and ongoing replication |\n| Managed CDC in ELT platforms | Many, via connectors | Bundled into broader data-loading pipelines, lowest setup effort |\n| Native cloud change streams | Cloud-native databases | Lowest operational overhead if you are already on that platform |\n\n## Common mistakes\n\n- **Polling instead of reading the log.** Polling loses deletes and fast updates that happen between poll windows, and adds read load the log-based approach avoids.\n- **No schema evolution plan.** A column rename or type change on the source breaks downstream consumers unless the pipeline handles schema evolution explicitly.\n- **Treating CDC as exactly-once by default.** Most CDC pipelines deliver at-least-once; consumers need idempotent handling of duplicate events.\n- **Ignoring the initial snapshot cost.** Bootstrapping CDC on a large existing table needs a snapshot phase that can be heavier than the ongoing stream ever is.\n- **Fanning out consumers without checking replay behavior.** A new consumer that needs historical data, not just future changes, requires either a fresh snapshot or a stream with long enough retention to replay from, which is worth confirming before you depend on it.\n\n## FAQ\n\n**Is CDC the same as database replication?**\nRelated but distinct. Replication copies data to a standby; CDC exposes changes as consumable events for arbitrary downstream consumers, not just a database copy.\n\n**Does CDC add meaningful load to the source database?**\nLog-based CDC adds very little, since it reads a log the engine already writes, unlike polling, which repeatedly queries the live tables.\n\n**What happens if the CDC connector goes down?**\nIt resumes from its last committed log position once restarted, as long as log retention has not been truncated past that point.\n\n**Can CDC feed a data warehouse directly?**\nYes, this is one of its most common uses, often paired with a streaming or batch loader on the consuming end.\n\n**Does CDC work with NoSQL databases?**\nYes, for engines that expose an equivalent change stream or oplog, such as MongoDB's change streams. The pattern is the same even though the underlying log format differs from a relational write-ahead log.\n\n## Where to go next\n\nSee [streaming vs batch processing](/blog/streaming-vs-batch-processing-2026) for how CDC output typically gets consumed, [the outbox pattern explained](/blog/outbox-pattern-explained-2026) for a companion technique that produces cleaner application-level events, and [what a race condition is](/blog/what-is-a-race-condition-2026) for why ordering and idempotency matter once multiple consumers read the same change stream.","hue":302,"metaTitle":"Change Data Capture Explained in 2026","metaDescription":"Change data capture explained for 2026 — how log-based CDC works, the Debezium and Kafka pipeline, and where CDC fits versus polling.","keywords":["change data capture explained 2026","what is change data capture","cdc debezium kafka","log based cdc","database change streaming","cdc vs polling","transaction log capture","real time data replication","cdc pipeline architecture"],"tldr":["**CDC reads the transaction log, not the tables** — log-based CDC captures every change without adding query load to the source database.","**It replaces fragile polling and dual writes** — downstream systems get a change event the moment a row changes, instead of a cron job diffing tables.","**Debezium is the de facto standard connector layer** — most CDC pipelines in 2026 run Debezium, or a managed equivalent, in front of Kafka or a similar log.","**CDC pairs naturally with the outbox pattern** — reading the transaction log is how many teams implement reliable event publishing without a dual-write bug.","**Skip:** building change capture on top of application-level polling queries — you lose deletes, miss rapid updates between polls, and add load the log-based approach avoids entirely."],"readTime":"4 min read","wordCount":888},"related":[{"slug":"streaming-vs-batch-processing-2026","title":"Streaming vs Batch Processing in 2026: Choosing a Model","excerpt":"Streaming and batch processing trade freshness against simplicity. This is the 2026 guide to when each data processing model earns its operational cost, with a hybrid option most teams end up using.","category":"code","date":"August 10, 2026","author":"ByteLedger Team","readTime":"4 min read","hue":300},{"slug":"what-is-a-database-migration-2026","title":"What is a database migration in 2026? Schema changes, versioned","excerpt":"A database migration is a versioned, repeatable change to a schema, tracked the same way source code is. Here is what that means in practice, and why teams stopped editing production schemas by hand in 2026.","category":"code","date":"July 17, 2026","author":"ByteLedger Team","readTime":"4 min read","hue":150},{"slug":"graphql-subscriptions-explained-2026","title":"GraphQL Subscriptions Explained in 2026: Real-Time Data","excerpt":"GraphQL subscriptions push live updates to clients over a persistent connection. Here is how they work, where they fit next to queries and mutations, and the pitfalls that trip up new implementations.","category":"code","date":"July 6, 2026","author":"ByteLedger Team","readTime":"4 min read","hue":280}],"sameCategory":[{"slug":"bazel-build-explained-2026","title":"Bazel Explained: What Hermetic Builds Actually Cost","excerpt":"Bazel delivers reproducible, precisely cached builds and demands that you describe everything. Here is what you get, what it costs, and who should say no.","category":"code","date":"August 19, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":145},{"slug":"graphql-federation-2026","title":"GraphQL Federation: One Graph, Many Teams","excerpt":"Federation composes independently-owned subgraphs into a single API. Here is what it solves, the operational cost it adds, and when a simpler gateway is enough.","category":"code","date":"August 19, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":300},{"slug":"hermetic-builds-explained-2026","title":"Hermetic Builds Explained: Same Inputs, Same Output","excerpt":"A hermetic build depends only on declared inputs. Here is what that property gives you, the common leaks that break it, and how to move toward it incrementally.","category":"code","date":"August 19, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":130},{"slug":"monorepo-tooling-compared-2026","title":"Monorepo Tooling Compared: What You Actually Need","excerpt":"Monorepo tools solve task orchestration and caching, not repository layout. Here is what each tier provides and how to tell when you have outgrown the simple option.","category":"code","date":"August 19, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":150}],"newer":{"slug":"cd-ladder-vs-high-yield-savings-2026","title":"CD Ladder vs High Yield Savings: Which Wins","excerpt":"A CD ladder and a high-yield savings account both beat a checking account, but they trade liquidity for rate in different ways. Here is how to choose between them for your cash in 2026.","category":"finance","date":"July 31, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":317},"older":{"slug":"chaos-engineering-guide-2026","title":"Chaos Engineering Guide 2026: Getting Started Safely","excerpt":"Chaos engineering injects controlled failure to test resilience assumptions before an incident does it for you. Here is how to start small, hypothesize, and scale up safely.","category":"code","date":"July 31, 2026","author":"ByteLedger Team","readTime":"4 min read","hue":322}}