Scrivio Interview library
DesignPrincipal7 min read · updated 12 November 2026

Your platform has grown to many CDC pipelines (Debezium, vendor tools, custom triggers) feeding search, caches and the warehouse. How would you set strategy for CDC as a platform capability?

I would turn CDC from a collection of team projects into one platform capability. That means one standard CDC approach per database type, run by a platform team with monitoring of lag, replication slots and failures; contracts that say which tables or outboxes are published, with schemas in a registry and compatibility rules; security controls such as column filtering and access control, because the log exposes everything; managed operational risks such as slots filling disks, snapshot load on primaries, ordering and duplicates; and a deliberate build versus buy decision on managed CDC services.

Why this question is asked

When CDC spreads organically, every team picks its own tool for its own consumer. One team runs Debezium for search, another uses a vendor tool for the warehouse, a third wrote triggers years ago for the cache. Each works until it does not, and then the failure is often a production database running out of disk because of a forgotten replication slot. Interviewers ask this at the senior level to see whether we can set a strategy that reduces risk and cost without stopping teams. In this answer, we will look at what goes wrong with many pipelines, then set out the strategy: standardisation, contracts, security, operational risk and build versus buy, with a migration plan.

1What Goes Wrong With Many Pipelines

Picture an inventory. Fourteen Debezium connectors run on three different Kafka Connect clusters, managed by different teams. Two vendor CDC tools feed the warehouse, each with its own licence. Five services have triggers that write into change tables, which a polling job reads. Some PostgreSQL primaries have replication slots nobody recognises. Nobody knows which tables leave which database, so a privacy review takes weeks.

The problems that follow are predictable. Operations knowledge is spread thin, so failures take hours to diagnose. Each team learns the same lessons about slots and snapshots the hard way. Schema changes break consumers that the owning team did not know existed. And the company pays for overlapping tools. The capabilities themselves are fine; the lack of a shared approach is the problem.

2Standardise One Approach per Database Type

The first decision is to choose one CDC approach for each database family and operate it as a platform. For PostgreSQL and MySQL, that might be Debezium on one managed Kafka Connect cluster per region, feeding Kafka with Avro and a schema registry. For a database where Debezium is weak, it might be the vendor's native change stream. Triggers are retired, because they add write cost inside every transaction and capture nothing reliably outside them.

A platform team owns the runtime: deploying connectors from configuration in Git, upgrades, capacity and on-call. Service teams declare what they publish; they do not run infrastructure. Every connector reports the same metrics, so one dashboard shows the whole fleet.

Step throughCDC as a platform capability
  1. Consumerssearch, caches, warehouse, services
  2. Kafka topics and schema registrycontracts, compatibility rules, ACLs
  3. Managed connector runtimeDebezium on Kafka Connect, config in Git
  4. Source databasesslots, binlogs, outbox tables
  5. Monitoring and runbookslag, slot WAL, failures, snapshots

5 layers, from the top down. Step through them one at a time.

3Contracts: What Is Published and How It May Change

Each source declares in a small contract file which tables or outbox tables it publishes, who owns them, the schema subject in the registry, and the compatibility rule, such as BACKWARD for most topics and FULL for widely shared ones. The platform only captures tables listed in a contract, which by itself answers the question of what leaves each database.

The service's CI checks migrations against the registry, so incompatible changes fail before deployment. For operational consumers, the strategy prefers outbox events over raw tables, because events can stay stable while internal schemas change; raw tables are published mainly for the data platform.

YAML
# cdc/orders-service.yml
source: orders-db (postgresql 17)
owner: team-orders
publishes:
- table: public.outbox # domain events, for services
subject: events.Order-value
compatibility: FULL
- table: public.orders # raw, for the data platform only
subject: cdc.orders.public.orders-value
compatibility: BACKWARD
exclude_columns: [customer_email]
readers: [data-platform]

4Security: The Log Contains Everything

CDC reads below the application's access controls. A replication connection sees every column of every captured table, including personal data, payment references and internal notes, and a Kafka topic is often far easier to read than the database. So the strategy sets security defaults. Connector credentials are dedicated replication users with only the needed rights. Sensitive columns are excluded or hashed in the connector, using Debezium's column exclude and mask options, before data reaches Kafka. Topics have ACLs that grant read access only to the readers named in the contract. Retention and deletion rules for topics follow the data classification of the source, so personal data deletion requests can be honoured downstream as well.

5Operational Risks and How the Platform Handles Them

Several CDC risks can hurt the source database itself, which is why they deserve a platform rather than per-team care.

Operational risks of CDC
RiskWhat happensPlatform control
Replication slot inactiveWAL retained until the primary's disk fillsalerts on lag, max_slot_wal_keep_size, slot inventory
Binlog purged during outageMySQL connector cannot resumeretention longer than recovery time, alerts
Initial snapshothours of read load on the primarysnapshot from replicas, incremental snapshots
Orderingevents reordered across keyskey by primary or aggregate id, document per-key order
Duplicatesresent events after restartsat-least-once documented, idempotent consumers

The first row deserves emphasis. An inactive replication slot is the single most common way CDC takes down a primary, so every slot must belong to a known connector, be monitored for activity and retained WAL, and be capped with max_slot_wal_keep_size, with a runbook for both a lagging and an invalidated slot. Ordering and duplicates are a consumer concern, but the platform documents the guarantees clearly, at least once and ordered per key, so every team builds idempotent consumers from the start.

6Build Versus Buy

Running Debezium and Kafka Connect ourselves gives control, no licence cost and open formats, but it costs a team: perhaps three or four engineers for a fleet of a few hundred connectors, plus on-call. Managed CDC services from cloud providers or vendors reduce that operational load, handle upgrades and often offer simple setup for many sources. The costs are price, which usually grows with data volume, lock-in to the provider's formats and connectors, and less control over details such as snapshot behaviour or slot handling.

I would decide with numbers: the yearly cost of the managed option at our expected volume against the fully loaded cost of the platform team, plus how critical fine control is for our largest databases. A common outcome is a mix: managed CDC for simple sources into the warehouse, and self-run Debezium for the operational pipelines where we need control. Whatever we choose, keeping events in Kafka with schemas in a registry keeps the choice reversible.

7Migrating the Existing Pipelines

We do not rewrite fourteen connectors and five trigger systems at once. First we build the inventory: every connector, slot, trigger and tool, its source, consumers and owner. Unknown replication slots are investigated and removed, which often prevents the next incident immediately. Then we move pipelines onto the platform in order of risk, starting with trigger-based pipelines on busy databases and unmonitored slots. Each migration runs the old and new pipelines side by side, compares counts, and switches consumers before retiring the old path. We report progress as the share of CDC traffic on the platform and the number of slot incidents per quarter.

8Follow-up questions

Why not let each team keep its own tool if it works?

Because the risks are shared even when the tools are not. A forgotten slot from one team's connector can fill a database that many teams depend on, and a privacy review must cover every pipeline. A platform concentrates expertise and monitoring, while teams keep control of what they publish.

How do you handle the initial snapshot for a very large table?

We take it from a replica where possible, or use Debezium's incremental snapshots, which read the table in chunks while streaming continues and can be paused. We schedule large snapshots outside peak hours and watch the primary's load during them.

What would you measure to show the strategy works?

The share of CDC pipelines on the platform, slot-related incidents, time to onboard a new source, mean time to recover a failed connector, and the cost per gigabyte of change data. A falling incident count and onboarding time measured in days instead of weeks show progress.

9Conclusion

In this answer, we set a strategy for CDC as a platform capability. We standardise on one approach per database type operated by a platform team with shared monitoring, define contracts for which tables or outboxes are published with schemas and compatibility rules in a registry, apply column filtering and access control because the log exposes everything, manage operational risks such as replication slots, snapshots, ordering and duplicates centrally, and make a numbers-based build versus buy decision, migrating existing pipelines gradually from an inventory.

What to say in the interviewAbout 80 seconds aloud

Open with

I'd start with an inventory, because usually nobody knows every connector, trigger and replication slot, and an unknown slot is the classic way CDC fills a primary's disk.

Then, if they want more

Then I'd standardise: one CDC approach per database type, for example Debezium on a managed Kafka Connect runtime for PostgreSQL and MySQL, with Avro and a schema registry, run by a platform team with connector configs in Git and one dashboard for lag, slot WAL and failures. Triggers would be retired.

Second, contracts: each source declares which tables or outbox tables it publishes, the owner, the registry subject and the compatibility rule, and the service's CI checks migrations against it. For operational consumers I'd prefer outbox events; raw tables are mainly for the data platform.

Third, security: the log exposes every column, so dedicated replication users, column exclusion or hashing in the connector, and topic ACLs limited to named readers. Fourth, operational risk handled centrally: slot monitoring plus max_slot_wal_keep_size, snapshots from replicas or incremental, and documented at-least-once, per-key ordering so consumers are idempotent.

Finally, build versus buy with real numbers: managed CDC saves operations but costs money and lock-in, so often a mix. Then I'd migrate pipelines in order of risk, running old and new in parallel before switching.

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 "Your platform has grown to many CDC pipelines (Debezium, vendor tools, custom triggers)...": https://scrivio-interview-library.netlify.app/databases/analytics-and-cdc/33a0b5be1e/