Skip to content

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

ClickHouse 5 min read Case study mediumAdept

From batch processing to streaming: AMP’s data journey from open-source to ClickHouse Cloud

AMP, a Shopify analytics platform, replaced a brittle twice-daily Postgres-to-ClickHouse batch sync, which routinely left data 30 to 72 hours stale and needed a 1.2 TB RAM server, with a streaming pipeline into ClickHouse Cloud. Shopify webhooks flow through Amazon EventBridge and Lambda into ReplacingMergeTree tables, which deduplicate updates. To avoid the cost of small inserts, Kinesis Data Firehose buffers events to S3 and asynchronous inserts are enabled, since ClickHouse performs best with batches of at least 1,000 rows. Environments are provisioned reproducibly with the ClickHouse Cloud Terraform provider.

Related posts

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

  • How ClickHouse Cloud enabled LaunchDarkly to build and ship features faster

    ClickHouse mediumAdept

    LaunchDarkly replaced Kinesis/Flink/Lambda streaming pipelines and an S3/Parquet/Athena batch warehouse with ClickHouse Cloud. Raw events are now queried directly, and materialized views are added only where needed. The system ingests about 6 PB/month of uncompressed JSON through an HTTP API, S3 protobuf batches, Lambda-converted Parquet and INSERT INTO SELECT. Data is fresh in about 30 seconds with roughly 100 days of retention, high-cardinality per-user analytics became practical, and seven product features now run on it. Lessons learned: don't coarsen ORDER BY keys, drop OLTP habits (for example, use two-stage queries for latest-N), and plan for workload isolation as adoption outpaces the platform team. Next steps are ingest-time joins for Release Guardian regression detection and migrating Elasticsearch workloads.

  • How Lyft powers batch and real-time analytics with ClickHouse Cloud

    ClickHouse mediumAdept

    Lyft replaced Apache Druid with ClickHouse, first self-managed and then on ClickHouse Cloud, for analytics that read over 450 TB and write about 4 TB per day at hundreds to thousands of queries per second. Batch jobs are defined in TOML files that specify a Trino aggregation and the target table layout, read from S3 via the s3 table function into a staging table, and swap partitions. Real-time pipelines use Flink to deserialize Kafka and Kinesis events, resolving nested protobuf messages at runtime with Java reflection so ClickHouse schemas no longer need manual syncing. Migration friction included unavailable features such as the Join engine (replaced by dictionaries) and the Kafka table engine, plus batch-size and data-freshness tuning.

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

  • Appcues delivers personalized customer engagement with ClickHouse Cloud

    ClickHouse mediumAdept

    Appcues moved its customer-facing product analytics and segmentation from Snowflake plus Airflow rollups to ClickHouse Cloud, covering 1.31 PB of data and over 1 billion user profiles. Events flow through Kafka into a deduplicating consumer. Materialized views replaced the Airflow pre-aggregation jobs, and SharedReplacingMergeTree with argMax instead of FINAL resolves the latest profile state. Lightweight deletes in ClickHouse 25.6 cleared a GDPR deletion backlog. P95 query latency fell from 20+ seconds to under 2, ingestion-to-query latency dropped from 10+ minutes to about 5 seconds, and analytics spend fell 23%.

The quest for software engineering knowledge.

Look:
Layout: