Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

Across your company, teams built dozens of denormalized copies of product and customer data in caches, search clusters and service databases. Incidents from stale data are rising. What principles and investments do you set?

I would set the principle that every copy has a named source of truth, an owner, a freshness target and a documented update mechanism, and invest in three things: change data capture with an outbox or log-based capture instead of ad hoc dual writes, a platform capability for reconciliation and drift detection, and fewer copies where one shared read API or search index can serve several consumers. Stale-data incidents and their cost are reported regularly, which is what justifies the platform work.

Background to this question

Copies of product and customer data spread for good reasons: each team wanted fast reads and independence. But each copy is maintained in its own way, and when a price, address or consent flag changes, some copies hear about it late or never. A leader is asked this question to see whether they can turn a stream of incidents into principles, investments and a way to measure progress, without stopping the teams. In this answer, we will look at why the copies drift, set the principles, choose the update mechanism, build drift detection, reduce the number of copies, and decide how to report it.

1Why Dozens of Copies Drift

A denormalized copy is data stored a second time so a service can read it quickly without asking the owner. Each copy is fine on its own. The trouble is how they are kept up to date. Most were built with a dual write: the service that changes the data writes to its own database and then also calls the cache, the search cluster or another service. If the process crashes between the two writes, or the second call times out and is not retried, the copy is wrong and nothing notices.

Other copies were refreshed by nightly batch jobs that silently stopped, or by event consumers that fell behind after a deployment. And many copies have no owner at all, so when someone does notice a wrong price, there is nobody whose job it is to fix the mechanism rather than the one row.

Step throughHow a dual write loses an update
Product serviceProduct DBSearch cluster
UPDATE price = 45.00
commit OK
index price = 45.00
timeout, not retried
still shows 40.00

5 messages in order. Play them, or step through them one at a time.

The database and the copy disagree, and nothing in the system records that they do.

2Principle: Every Copy Is Registered and Owned

The first principle is simple to state: every copy of product or customer data has a named source of truth, a named owning team, a freshness target (for example 'within 60 seconds' or 'by 6 a.m.'), and a documented update mechanism (CDC, events, TTL expiry). We keep these in a lightweight catalog, which can start as a table in the service registry.

This turns vague questions into answerable ones. When a stale address causes a failed delivery, we can look up which copy was read, who owns it, what its target was and whether it was met. It also exposes copies nobody can justify, which are the easiest ones to remove.

3Investment 1: Replace Dual Writes With CDC and the Outbox

Dual writes drift because two systems are written without a shared transaction. The fix is to write once and derive the rest from that single write. In the outbox pattern the service writes its change and an event row into an outbox table in the same database transaction, and a relay (often CDC reading the database log) publishes the event to Kafka. Either both the change and the event are committed, or neither is.

Java
@Transactional
public void changePrice(long productId, BigDecimal price) {
Product p = products.findById(productId).orElseThrow();
p.setPrice(price); // 40.00 -> 45.00
outbox.save(new OutboxEvent("product", productId,
"PriceChanged", json(Map.of("price", price)))); // same transaction as the update
} // commit: both rows or neither; the relay publishes the event afterwards

Consumers that maintain copies then read the stream and must be idempotent (applying the same event twice changes nothing), because delivery is at least once. Log-based CDC on the owner's tables, for example with Debezium, gives the same guarantee for teams that cannot change their code yet. The platform team provides both as supported building blocks, so teams do not invent their own.

4Investment 2: Drift Detection as a Platform Capability

Even with good mechanisms, consumers fail, bugs happen and backfills go wrong. So we need to measure drift, not just hope it is zero. Reconciliation means periodically comparing a copy with its source. Doing this well is too much work for each team alone, so the platform offers it: a job that takes a source query, a copy query and a key, compares hashes of the relevant fields for a rolling sample or the full set, and publishes the mismatch rate as a metric with alerts.

Step throughReconciliation run for one copy
  1. Read keys and field hashes from sourcee.g. product_id, hash(price, name)
  2. Read the same from the copySearch index, cache or service DB
  3. Compare by keyMissing, extra, different
  4. Mismatch rate above target?
    YesAlert the owner and repair from sourceNoRecord the metric
  5. Publish rate on the copy's dashboardTrend over weeks

5 steps in order. Play them, or step through them one at a time.

The repair step re-reads the source and rewrites the copy, which is safe because the source is the truth by definition. Over time the dashboard shows which mechanisms are reliable and which are not, which guides the next investments.

5Investment 3: Fewer Copies, Not Just Better Ones

Some copies exist only because no good shared alternative did. If eight services each copy the product catalog into their own database just to display names and prices, one well-designed product read API, with caching and a clear latency target, or one shared search index can serve most of them. Each copy removed is a copy that can never drift.

We should be careful not to swing to the other extreme, a shared database everyone reads, which brings back tight coupling. The goal is a small number of well-run read paths, chosen per access pattern, instead of dozens of private ones.

6Measuring and Reporting the Problem

Platform work competes with product features, so it needs evidence. We tag incidents caused by stale data, record their impact (failed deliveries, wrong prices honoured, support hours, refunds) and report the count and cost each quarter, alongside drift rates and the number of copies still using dual writes. A chart showing stale-data incidents falling as copies move to CDC is what keeps the investment funded.

I would also set a target the teams can act on, such as 'no copy of customer data without a registered owner by the end of the quarter, and all price copies on CDC within two quarters', and review it in the regular architecture forum rather than as a one-off campaign.

7Follow-up questions

How do you get teams to register copies they do not think of as copies?

Make it part of things they already do. The design review template asks which fields are owned elsewhere, and data lineage from the CDC platform shows which topics a service consumes. I would also start with the copies behind recent incidents, because those teams are already motivated.

Is a TTL on a cache an acceptable update mechanism?

Yes, if the freshness target allows it. A product name cached for five minutes is often fine; a consent flag or a price used for checkout usually is not. The point of the principle is that the TTL is chosen against a stated target, not picked by habit.

What if a team cannot change its code to use an outbox?

Log-based CDC on its existing tables gives most of the benefit without code changes, because every committed change is captured from the database log. The trade-off is that consumers see table-shaped changes rather than domain events, so a data contract on those topics is important.

8Conclusion

In this answer, we traced stale-data incidents to unowned copies maintained by dual writes and fragile batch jobs. The response was a principle that every copy has a source, owner, freshness target and update mechanism; three investments in CDC with the outbox pattern, platform reconciliation and drift detection, and fewer copies through shared read paths; and regular reporting of stale-data incidents and their cost to keep the work funded.

What to say in the interviewAbout 90 seconds aloud

Open with

I would treat this as a platform problem, not a series of bugs. Most copies drift because they are kept up to date with dual writes, where the service writes its database and then calls the cache or search cluster, and a crash or timeout between the two leaves them disagreeing.

Then, if they want more

So the first principle is that every copy has a named source of truth, an owning team, a freshness target and a documented update mechanism, kept in a simple catalog. That alone surfaces copies nobody can justify. Then three investments.

One, replace dual writes with the outbox pattern or log-based CDC, so the change and its event commit together and consumers update copies idempotently from Kafka; the platform team provides these as supported building blocks.

Two, reconciliation as a platform capability: a reusable job that compares hashed fields between source and copy, publishes a mismatch rate per copy, alerts the owner and can repair from the source.

Three, fewer copies: if eight services copy the catalog just to show names and prices, one product read API or one shared search index can serve them, and a removed copy can never drift. Finally, I would tag stale-data incidents and report their count and cost each quarter, next to drift rates and how many copies still use dual writes. That evidence is what keeps the platform work funded against feature work.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Across your company, teams built dozens of denormalized copies of product and customer...": https://scrivio-interview-library.netlify.app/databases/data-modeling/fa4d51a027/