Real-time event streaming with ClickHouse, Confluent Cloud and ClickPipes
ClickPipes, a managed Kafka ingestion service in ClickHouse Cloud, replaces the ClickHouse Kafka Connector in a pipeline that streams Google's public Ethereum dataset from Pub/Sub through Confluent Cloud into ClickHouse. The pipeline evolved from a batch BigQuery-to-GCS export with about 30 minutes of delay, to a Pub/Sub-to-Kafka stream about 4 minutes behind the chain, and now ClickHouse pulls directly from the Kafka topics. One ClickPipe per topic lands raw JSON into message tables, and materialized views using JSONExtract populate typed MergeTree tables. Configuration tips cover using the Confluent API key as credentials, setting a unique consumer group and supplying the bootstrap endpoint.
Related posts
- Real-time Event Streaming with ClickHouse, Kafka Connect and Confluent Cloud
ClickHouse mediumAdept
ClickHouse's official Kafka Connect sink, which uses the KeeperMap table engine for exactly-once semantics, can now be deployed as a Confluent Cloud Custom Connector. The walkthrough streams public Ethereum datasets from Google Pub/Sub through a Confluent Kafka topic into ClickHouse Cloud using only UI configuration, cutting data latency from about 30 minutes with the earlier batch BigQuery export to roughly 4 minutes. Practical tips include using a pull subscription and raising the Pub/Sub acknowledgement deadline from 10s to 60s to avoid duplicate deliveries. Cost estimates are under $1/month for Pub/Sub on the blocks dataset and about $6/day for Confluent.
- Data Hive: The story of beehiiv’s journey from Postgres to ClickHouse
ClickHouse easyNovice
beehiiv replaced its Postgres-and-Ruby-queue analytics system, which struggled with billions of email events and had multi-hour reporting delays, with a Kafka-fed ClickHouse Cloud pipeline. The design leans on ReplacingMergeTree for idempotent ingestion and event replay, dictionaries to enrich inserts without joins, ephemeral columns for intermediate calculations, materialized views as pre-aggregated shadow tables with alternate sort keys, and window functions for analytics. After six months the system held over 33 billion raw events in 1.5 TiB compressed (13 TiB uncompressed), with 22 ms median and 85 ms average query times. Creators now see send performance within seconds instead of hours.
- Collecting Semi-structured Data from Kafka Topics Using ClickHouse Kafka Engine
ClickHouse mediumAdept
Superology, a sports-betting product company, ingests clickstream and other customer quantitative data into ClickHouse straight from Kafka using the Kafka table engine with the Protobuf input format. Events are batched into a single proto message that uses oneof fields for varying event types. Schemas evolve only by adding fields, which keeps them backward compatible; origin table columns are added with ALTER TABLE, and dropped fields are deprecated rather than removed. Materialized views filter and transform the data for funnels, segmentation and dashboards, tiered storage moves older data to S3, and built-in statistical functions such as welchTTest and mannWhitneyUTest support A/B and Bayesian experimentation.
- How FabFunnel powers real-time marketing analytics with ClickHouse Cloud
ClickHouse mediumAdept
FabFunnel moved its marketing analytics off a normalized MySQL reporting stack, where month-long queries took 11 seconds and year-long reports crashed browsers due to client-side merges, to ClickHouse Cloud. Spend and revenue data now stream through Confluent Kafka via ClickPipes into ReplacingMergeTree tables, which replace the old delete-and-reinsert refresh cycle. Refreshable materialized views pre-aggregate into a single reporting table, and a buffer table handles real-time click data. Queries now return in under a second, and the system handled 19.2M queries reading 11.67 trillion rows in one month.
- 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.