Loading…
“A generational leap”: How Trio unified payment analytics and cut storage by 88% with ClickHouse Cloud
ClickHouse
- Source
- Clickhouse
- Published
- Added to Yomu
Summary
Brazilian payment processor Trio faced severe data challenges after scaling and acquiring PayBrokers, processing over 243 million payments in early 2025 across disparate legacy databases. Because financial reconciliation and compliance demand absolute precision, the engineering team unified their analytics layer by migrating to ClickHouse Cloud. To handle out-of-order and duplicate events from their Redpanda streaming pipelines, Trio implemented sliding-window refreshable materialized views alongside ReplacingMergeTree engines rather than recomputing entire historical datasets. A custom ETL service manages schema drift before inserting clean records into ClickHouse, while batch ingestion is coordinated through Airflow. Consequently, Trio reduced storage consumption by approximately 88% through columnar compression, ingested a 5-billion-row migration without issue, and maintained real-time query performance across more than one billion daily ledger data points.
Context
Trio processed over 243 million payments in the first half of 2025 across disparate legacy and active systems. Financial reconciliation, legal compliance, and anti-money laundering policies required perfectly accurate, traceable numbers, but the existing operational transaction databases were not designed to handle high-volume analytical workloads, out-of-order signals, or late-arriving events.
Approach / What changed
Trio centralized analytics on ClickHouse Cloud, feeding data via Redpanda streaming with a custom ETL service to manage schema drift, alongside Airflow for batch loads. To correct late-arriving data without expensive full recalculations, they deployed a sliding-window pattern using refreshable materialized views over recent periods (such as the last four hours) paired with ReplacingMergeTree for deduplication.
Takeaways
- Trio achieved an 88% storage reduction compared to their previous setup due to ClickHouse's columnar storage and compression.
- Recalculating narrow sliding windows via refreshable materialized views prevents the heavy overhead of re-materializing entire datasets when late events arrive.
- Using a custom pre-processing ETL service in front of Redpanda allowed Trio to manage schema drift and event dependencies before inserting typed records into ClickHouse.