Skip to content

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

ClickHouse 6 min read Case study easyNovice

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

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.

Assumes: Change data captureOLTP vs OLAP databases

Related posts

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

    ClickHouse mediumAdept

    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.

  • Postgres CDC in ClickHouse, A year in review

    ClickHouse mediumAdept

    A year after PeerDB's acquisition, Postgres CDC into ClickHouse via ClickPipes has grown to 400+ companies replicating over 200 TB per month, driven by real-time customer-facing analytics and data warehousing workloads. Key engineering changes include keeping logical replication connections open, because reconnects re-read WAL from restart_lsn and spiked lag. CTID block-based partitioning cut initial-load partition generation from 7+ hours to under a second, and 50+ pre-flight checks plus bucketed user-facing alerts cut on-call load by orders of magnitude. The biggest remaining gap is data modeling overhead from ReplacingMergeTree's asynchronous deduplication, which ClickHouse plans to address with lightweight UPDATEs and unique indexes.

  • Enhancing Postgres to ClickHouse replication using PeerDB

    ClickHouse mediumAdept

    PeerDB hardened its Postgres-to-ClickHouse CDC pipeline in four ways. It continuously drains the logical replication slot into an S3 stage, so WAL can't pile up when ClickHouse is down. It tunes ClickHouse memory settings (max_block_size, max_insert_block_size, max_threads, memory_overcommit_ratio_denominator, dial_timeout) to stop out-of-memory and overcommit-tracker failures on small clusters. It adds Lua row-level transformations for things like PII masking. On the security side, it uses short-lived IAM role credentials plus attribute-based access control on its multi-tenant S3 staging buckets.

  • How SewerAI is using ClickHouse to modernize sewer management at scale

    ClickHouse mediumAdept

    SewerAI replicates its Postgres transactional data into ClickHouse via CDC (moving from Confluent/Debezium to self-hosted Debezium+Kinesis to PeerDB, and now ClickPipes) and uses materialized and refreshable materialized views to denormalize 40+ tables into a single hundreds-of-billions-row "Megatable" for real-time municipal analytics. Bulk customer operations caused update failures and backlogs because compute was always near its limit. The fixes were incremental refreshes over only the last ~70 seconds of data, projections on clean tables, dictionaries instead of LEFT ANY joins, join ordering, LIMIT instead of DISTINCT, and filtering before joins, which alone gave about 3x speed at half the compute. With these changes, data volume tripled and read/write operations rose tenfold while compute usage stayed flat.

  • “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.

The quest for software engineering knowledge.

Look:
Layout: