Skip to content

Data and platforms · 6 November 2026 · 3 min read

Change data capture: let the database tell you what changed

Instead of asking the database what changed, read the log it already keeps, and design for the bad days from the start.

In this article
  1. The alternatives, and why we passed
  2. What we capture, and how
  3. Designing for the bad days
  4. Is it right for you?

Live dashboards and AI features both need to know the moment data changes. The most reliable way to find out is to read the log the database already keeps of every change, and to spend most of the design effort on the days when things go wrong.

Every serious database keeps a running log of every insert, update and delete, so it can recover after a crash. Change data capture reads that log and turns each change into a message other systems can act on. Nobody has to modify the application that writes the data, and nobody has to ask the database "anything new?" every few seconds.

The idea is often sold as a way to get data out of an old system nobody dares touch, and it's good at that. On the real-time data platform we work on, though, we chose it deliberately for a brand-new system, because it solves a problem every live product eventually has: keeping several services in step with one source of truth without wiring them all directly to it.

The alternatives, and why we passed

The simplest option is a scheduled export. It's reliable, and always out of date by however long the schedule is. For a platform built around live data, that ruled it out.

The next option is polling: ask the database every few seconds what changed. It puts constant load on the database, it struggles to notice deletions, and two changes in quick succession can blur into one.

The third is to have the application send a message every time it writes something. That works until the day the write succeeds and the message doesn't, or the other way round, and the two quietly disagree from then on.

Reading the database's own log avoids all of those problems, because the log is the record of what really happened.

What we capture, and how

We don't stream every table. We capture a small number of tables that other services actually depend on, such as the core configuration they work from, plus one table built specifically for events. When the application needs to announce something, it writes the event to that table in the same database transaction as the data change itself. Either both happen or neither does, and change data capture carries the event onwards.

The messages are keyed, so every change to the same record arrives in the order it happened. That's the ordering that matters: two updates to one customer must never swap places, while updates to two different customers can safely run in parallel.

Designing for the bad days

The interesting engineering is all in what happens when things go wrong, so most of our decisions were about that.

Starting from a consistent copy. The log only shows changes. A new reader also needs everything that already exists. Our capture takes a fresh, consistent snapshot of the tables it follows each time it starts, then moves straight on to streaming changes, so a reader never has to stitch two sources together.

Never losing our place. The database keeps the log for as long as a reader has a bookmark in it. There's a setting that throws the bookmark away whenever the capture stops. It's convenient for tidy test environments, and we rejected it for real ones, because it can silently lose changes that happened while the capture was down.

Watching the watcher. A small scheduled job checks the capture's health and configuration every three minutes, and puts it right if it has drifted. Nobody wants to find out from a customer that live updates stopped at lunchtime.

Checking the answers independently. Downstream, a separate check works out key outputs again, independently, and compares them with what the live pipeline produced. If they disagree, the difference is recorded and corrected through a proper, audited route instead of being patched by hand.

Is it right for you?

Change data capture earns its keep when several systems need to react quickly to the same data, or when you can't, or shouldn't, change the application that writes it. It's overkill for a nightly report.

If you do adopt it, spend most of your effort where we did: on the first copy and on never losing your place. Then make sure you hear within minutes when something stops. The happy path takes a week. The bad days are where the platform earns your trust.

Forward Deployed Engineer · from £650 + VAT a day

A named engineer inside your team to design and build real-time data flows that keep working on the bad days, handed over with everything documented.

All articles

Read something that sounds like your problem?

A free 15-minute intro with our CEO. Bring the article, and he’ll tell you which service fits, if any. If a spreadsheet and two rules would do the job, we’ll say so.