How Figma Scaled Data Sync: From Multi-Day Full Dumps to Real-Time CDC
How Figma eliminated multi-day data pipeline lag: migrating from expensive nightly full database snapshots to incremental Change Data Capture (CDC).
On this page
When millions of designers and product managers collaborate live on Figma canvases, every stroke, vector shape, frame resize, and comment triggers updates in Figma’s transactional databases.
Historically, Figma’s analytics and business intelligence pipelines relied on a simple batch extraction model: nightly full-table database snapshots. Every 24 hours, scheduled workers connected to read replicas, executed full table scans, exported terabytes of data, and loaded the snapshots into their analytical data lake.
When Figma had 10,000 users, this batch pipeline completed in twenty minutes. But as Figma scaled to hundreds of millions of design files across hundreds of database shards, the full-table extraction model collapsed under its own weight:
- Full-table dumps took over 48 hours to complete, meaning analytics data was perpetually three days behind real-world reality.
- Database read replicas choked on massive sequential disk scans, degrading replication lag and risking operational failovers.
- If a network error occurred at hour 42, the entire pipeline failed and had to restart from scratch.
To solve this scaling bottleneck, Figma re-engineered its data infrastructure: transitioning from batch table dumps to a real-time incremental Change Data Capture (CDC) streaming pipeline.
The Collapse of Batch Table Extraction
[ Primary Postgres Shard ]
│ (Streaming Replication)
▼
[ Read Replica ] ──► (Nightly pg_dump: 48 Hours) ──► S3 ──► Snowflake
- Replica CPU pinned at 100%
- Massive IOPS contention
- Stale 3-day data in dashboards
The Modern Incremental CDC Architecture
Instead of periodically scanning every row in a billion-row table, Change Data Capture streams only the specific rows that were inserted, updated, or deleted since the last checkpoint.
1. Postgres Logical Decoding via pgoutput
PostgreSQL maintains a continuous Write-Ahead Log (WAL) recording every transaction before it is committed to table storage. By attaching logical decoding plugins (pgoutput), workers can read the binary mutation stream without scanning physical heap tables:
- Zero table lock acquisition.
- Near-zero CPU overhead on primary databases.
- Sub-second event emission.
2. High-Throughput Ingestion via Debezium and Kafka
Figma deploys Debezium connectors running inside Apache Kafka Connect:
- Debezium consumes WAL log offsets from each PostgreSQL shard.
- Changes are normalized into structured JSON/Avro events holding
beforeandafterrow states. - Events are partitioned across Kafka topics using primary keys, guaranteeing that mutations for any individual design file arrive in strict chronological order.
3. Near Real-Time Lakehouse Sync via Apache Iceberg
Kafka streams are ingested into an Apache Iceberg Lakehouse on AWS S3:
- Using Iceberg’s copy-on-write and merge-on-read capabilities, micro-batch streaming workers commit incremental updates every 5 minutes.
- Analytical queries in Snowflake, Trino, and ClickHouse read freshly committed Parquet files without blocking live streaming writers.
Key Results and Performance Gains
- Pipeline Latency Slashed: Analytical data freshness dropped from 3+ days down to under 10 minutes.
- Database Compute Relief: Read replica CPU utilization dropped by over 60%, eliminating replication lag spikes during business hours.
- Fault-Tolerant Resumption: Because Kafka tracks exact consumer offsets, network interruptions no longer require re-extracting terabytes of historical data. The pipeline resumes precisely where it left off.
Architectural Lessons for Data Engineers
- Stop Copying What Hasn’t Changed: Full-table dumps scale with total database size; CDC scales with mutation rate. Always choose the latter for high-volume systems.
- Preserve Ordering at the Partition Layer: In distributed event streams, always partition by entity primary key so updates and deletes are processed sequentially.
- Embrace Open Table Formats: Combining CDC with table formats like Apache Iceberg bridges the gap between streaming ingestion and fast SQL analytics.

/* Comments */
Comments are offline right now — we reconnect automatically, nothing is lost.