* [Topics](/en/topics "Topics")
* [Integration](/en/topics/integration "Integration")
* What is change data capture (CDC)?
What is change data capture (CDC)?
==================================
Published  March 23, 2021•*4*-minute read
Copy URL
Jump to section
---------------
What is CDC?How CDC worksCDC and Apache KafkaWhy use CDC?Use casesBusiness benefitsRed Hat & CDC
What is CDC?
------------
Change data capture is a proven [data integration](/en/topics/integration) pattern to track when and what changes occur in data then alert other systems and services that must respond to those changes. Change data capture helps maintain consistency and functionality across all systems that rely on data.
Data is fundamental to every business. However, the challenge is that data is constantly being updated and changed. And enterprises must keep up with those changes. Whether it's transactions, orders, inventory, or customers—having current, real-time data is vital to keeping your business running. When a purchase order is updated, a new customer is onboarded, or a payment is received, applications across the enterprise need to be informed in order to complete critical business processes.
How change data capture works
-----------------------------
When updating a source database—often a relational database such as Oracle, [Microsoft SQL Server](/en/topics/linux/why-run-sql-server-on-linux), Postgres, or mysql—you may need to update multiple related resources such as a cache and a search index. A simple approach would require upgrading your applications to update those resources at the same time. However, trying to consistently write this changed data to more than one target introduces many challenges and coordination overhead. CDC enables you to avoid issues like dual writes to, instead, update resources concurrently and accurately.
CDC accomplishes this by tracking row-level changes in database source tables—categorized as insert, update, and delete events—and then making those change notifications available to any other systems or services that rely on the same data. The change notifications are emitted in the same order they were made in the original database. In this way, CDC ensures that all interested parties of a particular data set are accurately informed of the change and can react accordingly, either refreshing their own version of the data or by triggering business processes.
In modern microservices-driven architectures, CDC has gained new importance by providing an indispensable bridge to connect traditional databases with cloud-native, event-driven architectures. Using CDC, enterprises can continue to use their legacy databases, while still making use of data through emerging technologies. For new deployments, CDC enables the use of useful patterns and schema like the "outbox," which allows [microservices](/en/topics/microservices) to exchange the consolidated data from a database transaction.
Red Hat resources
-----------------
[Keep reading](/en/resources "Keep reading")
Real-time changes with CDC and Apache Kafka
-------------------------------------------
While CDC captures database changes, it still requires a messaging service to deliver those change notifications to the applicable systems and applications. The most efficient way to accomplish this is by treating the changes as events—as in an [event-driven architecture (EDA)](/en/topics/integration/what-is-event-driven-architecture)—and sending them asynchronously.
[Apache Kafka](/en/topics/integration/what-is-apache-kafka) is the ideal way to provide asynchronous communication between the database and the consumers of the data that require a high-volume, replayable consumption pattern. Kafka is a distributed streaming platform that can publish, subscribe to, store, and process streams of events, in real-time. It's designed to handle data streams from multiple sources and deliver the data to multiple destinations, with high throughput and scalability.
Change data capture ensures the events transmitted by Kafka are consistent with the changes in the original source system, or database. Because Kafka messaging is asynchronous, events are decoupled from the consumers, allowing for more reliable delivery of all changes.
[This blog has more info on no-cost subscriptions](/en/blog/new-year-new-red-hat-enterprise-linux-programs-easier-ways-access-rhel "New Year, new Red Hat Enterprise Linux programs: Easier ways to access RHEL")
Why use change data capture?
----------------------------
Change data capture platforms, like [Debezium](https://debezium.io/), track changes in the database by monitoring the transaction log as changes are committed. An alternative to this approach is a simple poll-based or query-based process.
CDC, based in the transaction log, provides several advantages over these options, including:
* **All changes are captured:** CDC is designed to capture every change made to the database. Without CDC, intermediary changes and new data, such as updates and deletes, between 2 runs of the poll loop might be missed.
* **Low overhead:** The combination of CDC and Kafka provides near real-time delivery of data changes. This avoids increased CPU load caused by frequent polling.
* **No data model impact:** Using CDC, timestamp columns are no longer needed to determine the last data update.
Use cases
---------
The following examples represent some of the varied use cases for change data capture.
### Microservices integration
CDC can be used to sync microservices with traditional, monolithic applications, enabling smooth transfer of data changes from legacy systems to microservices-based applications.
### Data replication
CDC can be used for data replication to multiple databases, data lakes, or data warehouses, to ensure each resource has the latest version of the data. This way, CDC can provide multiple distributed (and even siloed) teams with access to the same up-to-date data.
### Analytics dashboards
CDC can be used to feed data changes to analytics dashboards—for purposes such as business intelligence—to support time-sensitive decision making.
### Auditing and compliance
To comply with strict data compliance requirements and heavy penalties for noncompliance, it is essential to save a history of changes made to your data. CDC can be used to save data changes for auditing or archiving requirements.
### Cache invalidation
CDC can be used for cache invalidation to ensure outdated entries in a cache are replaced or removed in order to display the latest versions.
### CQRS model updates
CDC can be used to keep Command Query Responsibility Separation (CQRS) read models in sync with primary models.
### Full-text search
CDC can be used to automatically keep a full-text search index in sync with the database.
Business benefits of CDC
------------------------
Change data capture can help your business make faster, data-driven decisions to reduce wasted time, effort, and revenue.
### Maximize data value
CDC helps companies maximize the value of data by enabling them to leverage the information for multiple purposes. By providing a method to consistently update the same data in various siloes, CDC allows the organization to get the most out of the data while preserving data integrity.
### Keep the business up to date
CDC allows multiple databases and applications to stay in sync with the latest data, giving business stakeholders the most up-to-date information.
### Make better, faster decisions
CDC empowers business users to make more accurate, and faster, decisions based on the most current information. Since decision-making data often loses value rapidly, it's important to make it available to all stakeholders as immediately as possible, using CDC and Kafka. Providing access to accurate, near real-time analytics is vital to building and maintaining your competitive advantage.
### Keep operations running without delays
When data in multiple systems isn't synchronized, those systems can have problems, like: reconciling orders, processing transactions, serving customers, generating reports, or following production schedules. Any one of these situations can delay your business. That means lost revenue. CDC enables your organization to keep data in sync, with low latency, across numerous systems to keep operations running smoothly.
[Learn more about data management](/en/topics/data-services/what-is-data-management "article | What is data management?")
Red Hat CDC: Debezium + Apache Kafka
------------------------------------
[Red Hat Integration](/en/products/integration) delivers change data capture capabilities, through Debezium, in combination with [Red Hat AMQ Streams](/en/technologies/jboss-middleware/amq) and Apache Kafka. Debezium is a distributed open source log-based CDC platform that supports capturing changes from a variety of database systems. Debezium is fast and durable, so your applications can respond quickly without missing an event.
Hub
The official Red Hat blog
-------------------------
Get the latest information about our ecosystem of customers, partners, and communities.
[Keep reading](/en/blog "The official Red Hat blog")
All Red Hat product trials
--------------------------
Our no-cost product trials help you gain hands-on experience, prepare for a certification, or assess if a product is right for your organization.
[Keep reading](/en/products/trials "All Red Hat product trials")
Keep reading
------------
### What is a service mesh?
Read this article to find out more about what a service mesh is, how it works, and the benefits and challenges of implementing a service mesh.
[Read the article](/en/topics/microservices/what-is-a-service-mesh "article | what is a service mesh?")
### What is application integration?
Application integration connects different systems and applications by enabling them to work together through exchanging data and using services.
[Read the article](/en/topics/cloud-native-apps/application-integration "article | What is application integration")
### What is middleware?
Middleware is software that provides common services and capabilities to applications outside of what’s offered by the operating system.
[Read the article](/en/topics/middleware/what-is-middleware "article | what is middleware")
Integration resources
---------------------
### Related content
* Case study
  [HCA Healthcare develops predictive analytics using Red Hat software](/en/resources/hca-healthcare-case-study)
* Blog post
  [Evolving our ServiceNow integration: Sunsetting the Notification Service for more capable alternatives](/en/blog/evolving-our-servicenow-integration-sunsetting-notification-service-more-capable-alternatives)
* Case study
  [GSE and Blaze transform the electricity market with OpenShift](/en/resources/georgian-state-electrosystem-and-blaze-case-study)
* Blog post
  [Beyond the horizon: Navigating the bridge between today's tech and tomorrow's AI](/en/blog/beyond-horizon-navigating-bridge-between-todays-tech-and-tomorrows-ai)
### Related articles
* [What is a service mesh?](/en/topics/microservices/what-is-a-service-mesh)
* [What is application integration?](/en/topics/cloud-native-apps/application-integration)
* [What is middleware?](/en/topics/middleware/what-is-middleware)
* [What is Apache Kafka?](/en/topics/integration/what-is-apache-kafka)
* [Why choose Red Hat for middleware?](/en/topics/middleware/why-choose-red-hat-middleware)
* [What is an API?](/en/topics/api/what-are-application-programming-interfaces)
* [Red Hat OpenShift application services](/en/technologies/cloud-computing/openshift/application-services)
* [What is an independent software vendor (ISV)?](/en/topics/digital-transformation/isv-partners)
* [What is a Kafka service?](/en/topics/integration/what-is-a-kafka-service)
* [What is streaming data?](/en/topics/integration/what-is-streaming-data)
* [Do banking APIs benefit from cloud technology?](/en/topics/api/banking-api)
* [What is a service registry?](/en/topics/integration/what-is-a-service-registry)
* [What is an event mesh?](/en/topics/integration/what-is-an-event-mesh)
* [How microservices support IT integration in healthcare](/en/topics/microservices/microservices-in-healthcare)
* [Why Red Hat for APIs?](/en/topics/api/why-choose-red-hat-apis)
* [What is service-oriented architecture?](/en/topics/cloud-native-apps/what-is-service-oriented-architecture)
* [What is the Kubernetes API?](/en/topics/containers/what-is-the-kubernetes-api)
* [What is a REST API?](/en/topics/api/what-is-a-rest-api)
* [What is event-driven architecture?](/en/topics/integration/what-is-event-driven-architecture)
* [What is API monetization?](/en/topics/api/what-is-api-monetization)
* [REST vs. SOAP](/en/topics/integration/whats-the-difference-between-soap-rest)
* [Why choose Red Hat for integration?](/en/topics/integration/why-choose-red-hat-integration)
* [What is API management?](/en/topics/api/what-is-api-management)
* [What is API security?](/en/topics/security/api-security)
* [What is GraphQL?](/en/topics/api/what-is-graphql)
* [What does an API gateway do?](/en/topics/api/what-does-an-api-gateway-do)
* [What is API design?](/en/topics/api/what-is-api-design)
* [What is integration?](/en/topics/integration/what-is-integration)
[More about this topic](/en/topics/integration "More about this topic")