Skip to content

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

ClickHouse 6 min read Case study mediumAdept

How Spyne simplified their CDC pipeline with ClickPipes and ClickHouse Cloud

Spyne replaced a self-managed Debezium → Kafka → ClickHouse Kafka-engine/materialized-view CDC pipeline with ClickPipes on ClickHouse Cloud. The move eliminated 1–1.5 hours of manual work per table onboarding and fixed schema drift, where new source columns were silently dropped by DDL-locked materialized views. It also brought tradeoffs: snapshotting a new table pauses the whole pipe, so critical tables were isolated into dedicated pipes. ReplacingMergeTree's eventual consistency required adding FINAL to queries at extra CPU cost, and binlog loss forces full table resyncs instead of targeted partial ones.

Assumes: change data capture basicsClickHouse MergeTree enginesMySQL binlog replication

Related posts

  • Change Data Capture (CDC) with PostgreSQL and ClickHouse - Part 2

    ClickHouse mediumAdept

    A Postgres-to-ClickHouse CDC pipeline is built with Debezium, Kafka Connect and a ClickHouse materialized view, keeping a ReplacingMergeTree table in sync with the 28M-row UK property price dataset under a mix of inserts, updates and deletes. Key configuration choices include REPLICA IDENTITY FULL (required for delete support), the pgoutput logical decoding plugin, per-row ordering via a single or hash-partitioned Kafka topic, and version/deleted columns in the ReplacingMergeTree engine. The ORDER BY is chosen for analytical access patterns, with the Postgres id appended last for uniqueness. The initial load uses the postgresql table function via INSERT INTO SELECT, which loads all 28M rows in about 80 seconds without tuning but requires pausing writes; Debezium's consistent snapshot is the alternative.

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

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

  • MongoDB CDC connector for ClickPipes is now generally available

    ClickHouse easyNovice

    ClickHouse Cloud's MongoDB CDC connector for ClickPipes, built on MongoDB Change Streams, is generally available after moving over 1.5PB for hundreds of customers. GA adds parallel snapshotting that splits collections into sampled `_id` ranges, and a structured ingestion mode that infers a schema and maps top-level fields to typed columns. Unexpected fields and type mismatches are routed to a `_peerdb_malformed_data` JSON column. It also adds pre-image support so deletes carry full documents, source-side delete filtering, resource and replication-lag metrics (source, destination, end-to-end) exposed via Prometheus, and Terraform/OpenAPI management. Billing starts November 4, 2026, with a claimed 5-10x cost advantage over third-party ETL tools.

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

The quest for software engineering knowledge.

Look:
Layout: