Douyin Group Rebuilds Its Real-Time Data Warehouse on Apache Paimon, Slashing Flink State from Terabytes to Gigabytes
Teams running real-time Flink pipelines at scale routinely hit a wall with state size and external KV store fragility. This production migration shows that a Paimon lakehouse can collapse a multi-component architecture into a simpler one, turning a TB-level state problem into a manageable GB-level one without sacrificing query concurrency.
A team at Douyin Group rebuilt its real-time data warehouse on Apache Paimon to fix cascading stability and cost problems in its legacy Flink-plus-MQ architecture. The old design forced engineers to manually construct retraction messages in Flink to handle changelogs, causing Keyed State to balloon into the terabytes and making jobs unstable. External KV lookups for dimension joins at 8 million RPS peak traffic also created a heavy dependency on a fragile caching layer.
The Paimon lakehouse converges dimension tables, changelog propagation, and batch queries inside the storage layer. DWD tables are defined as Paimon primary-key tables with `changelog-producer = 'lookup'`, so downstream DWS jobs consume changelogs directly without deduplication or manual retraction logic. Dimension joins happen locally against Paimon's LSM-Tree-based storage, removing the external KV bottleneck and improving data freshness from 50 minutes to under two minutes.
In a long-period aggregation scenario for live-stream reporting metrics, the new design offloaded state from Flink into Paimon, making Flink task state negligible while keeping query concurrency at millions via an external KV store. In a high-throughput short-video metrics pipeline, state size dropped from terabytes to hundreds of gigabytes, and the team eliminated all external dimension-table requests.
The core unlock is that Paimon absorbs the complexity of changelog handling and state management that Flink-plus-MQ architectures force onto application code. This isn't just a storage swap; it removes entire classes of Flink operator logic.
External KV stores become a liability at 8 million RPS not because they can't serve data, but because the cache-penetration tail forces a trade-off between freshness and stability. Paimon sidesteps this by co-locating dimension data with compute, turning a network-call problem into a local-read problem.
The decision to keep an external KV store for final metric serving, even after adopting Paimon, signals that lakehouse query performance still hasn't closed the gap with purpose-built KV stores for high-QPS point reads. The lakehouse handles the heavy lifting upstream; the serving layer stays specialized.