Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

ClickHouse 6 min read Case study mediumAdept

Scaling SaaS security: Reco’s migration from Postgres to ClickHouse Cloud

Reco, a SaaS security platform ingesting 10-12 billion JSON events weekly, moved over 90% of its workload from Postgres to ClickHouse Cloud. Running both databases synced via CDC had made schema migrations, updates, deletes and VACUUM painful. Reco replaced RDBMS features with ReplacingMergeTree and CollapsingMergeTree for upserts and deletes, idempotency and eventual consistency instead of transactions, and tenant-level atomic materialized view refreshes via REPLACE PARTITION. Further gains came from compute-compute separation, spill-to-disk settings, parallel_distributed_insert_select=2 (cutting resource needs by a third) and data-skipping indexes, plus using the EmbeddedRocksDB engine as a streaming state store in place of Spark state and Redis.

Related posts

  • How Seemplicity scaled real-time security analytics with Postgres CDC and ClickHouse

    ClickHouse easyNovice

    Seemplicity, a security remediation platform aggregating findings from 150+ tools, outgrew a Postgres-only design as heavy upserts, table bloat and multi-table joins across ~16 per-tenant tables slowed customer dashboards. It kept Postgres as the transactional layer and streamed changes into ClickHouse via PeerDB (now ClickPipes), choosing it over a Debezium–Kafka pipeline to avoid extra failure points. A multi-region staging-then-per-tenant-schema layout and denormalized AggregatingMergeTree tables with materialized views removed query-time joins. Dashboards that once took minutes now return in seconds or milliseconds, and storage is roughly 10 TB, an estimated 5–6x smaller than Postgres, while handling tens of billions of updates per month.

  • “Just OLAP it”: How Ramp rebuilt its analytics platform on ClickHouse Cloud

    ClickHouse mediumAdept

    Ramp moved customer-facing spend analytics off its Postgres monolith after enterprise customers' reports on a single card-transactions table began taking 40+ seconds, and now serves them in milliseconds from ClickHouse Cloud. The pipeline streams Postgres CDC via Debezium into per-table Kafka topics. Stateless Python enrichers denormalize the records, and a connector loads them into ReplacingMergeTree tables, with recurring OPTIMIZE and FINAL queries handling deduplication. A local benchmark of 60M transactions partitioned by business ID ran 16,000 randomized queries in 12 seconds, and a four-engineer pod shipped to production in about two months. The platform now backs in-app Reporting and Budgets, and Ramp plans to add enriched tables for every core data type.

  • 98% faster queries, 50% lower cloud costs: Verihubs’ journey from Postgres to ClickHouse

    ClickHouse mediumAdept

    Verihubs replaced a Postgres warehouse fed by daily Airflow batch pulls with a ClickHouse-based real-time OLAP stack. Kafka Connect and Debezium CDC stream data into MergeTree tables for append-only logs and ReplacingMergeTree tables for updatable rows. Materialized views and projections build daily and monthly rollups for reconciliation and invoicing, and Dagster handles complex detection jobs. Queries dropped from 20-30 minutes to 2-3 seconds, and cloud costs fell up to 50%. Lessons include designing ordering keys up front, choosing MergeTree engines carefully, expecting asynchronous mutations, and planning backfills because materialized views don't backfill automatically.

  • Vantage's Journey from Redshift and Postgres to ClickHouse

    ClickHouse easyNovice

    Vantage, a cloud cost platform handling billions of billing records, outgrew Postgres when constant deletes and reinserts kept vacuum running and pushed indexes out of memory. Redshift, tried next with Postgres as a cache, struggled with updates, needed data inserted in sort order, required expensive vacuum sort jobs, and forced billions of rows to be copied daily between the two systems. A 60-day migration to ClickHouse Cloud replaced the delete-and-reinsert pattern with ReplacingMergeTree and an incrementing import-version column, letting background merges handle updates. The result was double the resources at roughly Redshift's price, with query performance comparable to well-indexed pre-aggregated Postgres tables.

  • How Physical Intelligence unified its robotics data stack with Postgres managed by ClickHouse

    ClickHouse mediumAdept

    Physical Intelligence, a robotics foundation-model lab, split its data into raw petabyte-scale training data, transactional data needing ACID guarantees (under 100M rows), and high-cardinality metadata and annotations (10 to 100 billion rows). A single RDS Postgres instance full of JSONB columns could not handle both workloads, so the team moved to Postgres managed by ClickHouse, using ClickPipes to replicate operational data into ClickHouse for analytics. On the ClickHouse side, ReplacingMergeTree handles insert-heavy annotation writes, JSONB fields were flattened into sparse columnar tables, and materialized views cut query latency and database load. They also isolate read and write compute and put PgBouncer in front of batch jobs.

The quest for software engineering knowledge.

Look:
Layout: