Pinterest's Next-Generation DB Ingestion Technology
Key point
Pinterest built a unified CDC-based DB ingestion framework to reduce data latency and cut costs.
Details
Pinterest introduced a new framework to solve the limitations of its existing batch-centric ingestion approach, namely high data latency (24+ hours), unnecessary resource waste, and difficulties with data compliance.
The new system is centered on CDC (Change Data Capture) and was built using Debezium/TiCDC, Kafka, Flink, Spark, and Iceberg. This shortened the data update cycle from hours to minutes, and by processing only changed records, significantly reduced infrastructure costs.
The architecture consists of three main layers.
- CDC Layer: Writes database changes to Kafka with sub-second latency.
- Streaming Layer: Uses Flink to process CDC events in real time and stores them in CDC Iceberg tables on S3.
- Batch Layer: Uses Spark to periodically Upsert changes from the CDC tables into Base Iceberg tables.
This framework supports various databases such as MySQL, TiDB, and KVStore, prevents data loss through at-least-once guarantees, and has the scalability to handle petabyte-scale data.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.