Real-time data ingestion and CDC architecture for 2027

Planning real-time ingestion for 2027 starts with the data you need to keep correct. Separate change capture, transport, processing, storage and serving. Then decide how snapshots, deletes, schema changes and recovery work across the whole path.

A pipeline can move events quickly and still give the wrong answer. It can miss a delete, replay a payment twice or spend hours catching up after the source database changes. Those are architecture problems, not connector shopping problems.

This is a planning guide for 2027, based on the systems and documentation available today. It is not a prediction that every workload will become real time. Start with the business deadline. A fraud decision and tomorrow morning's report do not need the same system.

Choose the ingestion lane by the workload

ApproachUseful whenWhat you still own
Log-based CDCYou need database inserts, updates and deletes without repeated full-table scansDatabase permissions, initial snapshots, log retention, schema changes and recovery
Managed ingestionSupported sources and less connector maintenance matter mostFreshness targets, access, failure alerts, contract changes and the bill
Application events and stream processingThe business event or a continuous calculation is the productEvent contracts, ordering, replay, state and service ownership
Scheduled batchThe result can wait and the source has a safe export pathComplete extracts, repeatable loads and a clear completion deadline

These lanes can coexist. A database change is not always the same thing as a business event. A changed order row may not explain whether the customer cancelled or an operator corrected a mistake.

Keep the layers separate

Source database → capture → event transport → processing → storage → serving. Debezium, Kafka, Flink and Iceberg can fill parts of that path. They do different jobs. Buying one does not complete the design.

Give every boundary an owner. Define the key, schema, event time, retention and what a consumer should do when it receives the same change again. If one stage promises exactly-once processing, do not assume that promise automatically covers every external side effect.

Design the snapshot and the restart before launch

  • Initial load. Explain how the snapshot joins the change stream without missing or counting changes twice.
  • Source retention. Size the recovery window against the longest outage you intend to survive. Monitor lag and the source resources retained for replication.
  • Deletes and updates. Decide how keys, tombstones and changed primary keys reach each destination.
  • Schema changes. Decide which changes can pass automatically and which need a reviewed migration.
  • Replay. Separate a repair job from normal consumption. Check that repeating it does not repeat external actions.

The Debezium PostgreSQL connector documentation describes snapshots, replication slots, change events and recovery requirements. Check the version you deploy rather than copying a generic CDC checklist.

Measure useful freshness

Measure the age of the data when it becomes usable, not just when Kafka accepts it. Capture lag, queue time, processing time and table commit time can all contribute. Report the slow tail as well as the average. Add missing records, duplicate handling, failed changes and recovery time to the same review.

Faster is not free. More frequent commits can create more small files downstream. Tighter latency targets can also demand more compute and on-call work. Agree which delay is worth paying to remove.

A change is not finished when it reaches Kafka

  1. 1 CaptureTake the initial snapshot and retain a source position for later changes.
  2. 2 TransportKeep keys, ordering assumptions and replay retention explicit.
  3. 3 ApplyHandle repeated updates and deletes in the target model.
  4. 4 Make visibleCommit the table and refresh the reader before counting the data as fresh.
  5. 5 Prove recoveryRestart from a known position and reconcile a bounded business interval.
Illustrative flow. Capture, transport, application and reader visibility have separate failure points. End-to-end correctness requires evidence across all five steps, not just an accepted message.

A worked order-data pipeline

Consider a hypothetical retailer that needs a current order view and a longer analytical history. The source is PostgreSQL. The business wants confirmed orders visible to operations quickly, while daily reporting can tolerate a longer table-commit window. These are different deadlines, so I would not force both consumers through the same serving path.

A possible design captures order changes with Debezium, carries them in Kafka and applies them to a keyed operational view. A separate analytical path lands and models the changes before committing them to Iceberg. This is an architecture example, not a claim that one connector automatically handles every destination.

Define what an order means before drawing the boxes. An order header and its line items may change within one source transaction. If a consumer combines them, decide whether it can temporarily display an incomplete view. A collection of individually fresh rows is not necessarily a consistent business object.

The initial snapshot is part of the protocol

Capture the existing rows and the changes that happen while the snapshot runs. Use the connector's documented snapshot procedure rather than inventing a separate export and hoping the timestamps line up. Record the starting position, the snapshot mode and the point at which the consumer is caught up.

Debezium's PostgreSQL documentation describes snapshot modes, logical decoding, replication slots, replica identity and the shape of change events. The details depend on connector and database versions. A manual full-table export is not a drop-in replacement for that protocol.

The source can pay for a downstream outage

A stalled consumer can be more than a late dashboard. PostgreSQL replication slots retain WAL that a subscriber still needs, subject to the database configuration. Monitor retained WAL, free disk space and replication progress on the source. Agree how much recovery history you can afford before an outage threatens the system serving customers.

If required history is no longer available, do not claim a clean continuation from the last offset. Plan the resnapshot or repair path, protect the destination from duplicate application and reconcile the interval whose history was lost.

Specify updates and deletes as a contract

For a current-state destination, the key identifies which entity a change replaces. Repeated delivery should not create a second order. A delete must remove or mark the entity according to the destination's policy. A Kafka tombstone and a business deletion are related concepts, not interchangeable instructions for every storage engine.

For an audit history, preserving events may be the point. Do not run the current-state overwrite rule against a history table and then discover that you discarded the evidence. State which destination is a materialized view and which is the retained record.

Be careful with a changed primary key. The destination may need to retire the old key and establish the new one. Test the connector's emitted events and the consumer's behaviour instead of assuming that a generic upsert covers it.

Keep ordering narrower than the business promise

A keyed stream can help keep one entity's changes together. It does not by itself provide a global order across all topics, partitions and external writes. If inventory and payment updates must be interpreted together, define the transaction boundary or the reconciliation rule explicitly.

A useful consumer contract says what happens with a repeated change, a late change and an event whose source position is older than the state already applied. It also says which combinations are invalid. Those are test cases that an incident responder can use, not just words in an architecture review.

Measure the path with an example record

For a test order, retain source commit time, capture observation time, transport arrival, application completion, table commit and query visibility. Use clocks carefully. A source timestamp and a worker's local receipt time do not become interchangeable because both are stored in milliseconds.

Suppose the source-to-Kafka delay is small but the query remains behind. Investigate processing, checkpointing, table commits and reader refresh before buying a faster connector. If only one customer is behind, investigate key skew or a poisoned record rather than declaring the whole pipeline slow.

Failure symptoms and the evidence to collect
SymptomFirst checksDo not assume
Source disk keeps growingSlot progress, retained WAL, connector health and database limitsThe database is safe because Kafka is healthy
A deleted order reappearsReplay order, key changes and the destination's delete ruleA fresh timestamp makes the row correct
Counts match but totals differAmounts, currency, duplicate application and transaction boundariesEqual row counts establish equal business results
A restart repeats external actionsIdempotency keys and side-effect boundariesCheckpoint recovery covers every external system

Run a recovery exercise that can fail

  1. Write a bounded set of inserts, updates, deletes and key changes to a test source.
  2. Interrupt capture or application at a known stage, without deleting its recorded position.
  3. Continue source activity, then restart through the normal recovery path.
  4. Compare keys, values and business totals after catch-up, including the deleted entities.
  5. Repeat with a destination failure and a schema change. Record the manual steps and actual recovery time.

The exit criterion is an explainable result, not a green process. For a destination built on Iceberg, the ingest-pattern guide covers commit and maintenance choices. Cross-engine batch optimization is a separate concern; Apache Wayang is not a substitute for the CDC capture and recovery protocol.

Make the 2027 plan testable

Pick one source and one consumer. Write down the freshness target, a recovery test and the person who owns a failed load. Run a snapshot, restart the capture process, change a schema and replay a known interval. Expand only after you can explain the result.

For the storage decision, read the Iceberg ingest-pattern guide. For the wider migration, use the platform modernization roadmap.

If you need a second pair of eyes on the design, see my consulting services or contact me.