Announcing Ruby Gem analytics powered by ClickHouse and Ruby Central
ClickHouse and Ruby Central now offer free RubyGems download analytics via sql.clickhouse.com, covering over 180 billion download rows since 2017 plus daily aggregates and weekly metadata dumps (dependencies, versions, attestations). Hourly gzip NDJSON logs land in GCS: historical data was backfilled with tuned INSERT INTO SELECT over s3Cluster (about 10B rows per year in ~20 minutes), and new files stream in through the S3Queue engine feeding a materialized view. Because parallel Lambda exports per Fastly region arrive out of order, the queue runs in unordered mode, with a new queue created daily and old ones dropped to keep Keeper's file tracking small. 160 TB of raw JSON compresses to under 5 TB in ClickHouse.
Related posts
- ClickPy reaches one trillion rows
ClickHouse mediumAdept
ClickPy, a free open-source real-time analytics service for PyPI download statistics built on ClickHouse, has passed one trillion rows in its main downloads table. The data is exported from BigQuery to Parquet files in Google Cloud Storage, bulk-loaded via the s3 table function and kept current by an hourly cron-plus-worker pipeline (ClickLoad). Materialized views maintain pre-aggregated downstream tables for common query patterns, and dictionaries handle reference data. Public read-only access is limited to 10 billion rows read per query, so the aggregated tables, not the raw pypi table, are the practical way to query it.
- How Kami scaled from 80M to nearly 2B events per week with ClickHouse
ClickHouse mediumAdept
Kami's Postgres event tracking (Rails writing JSONB rows, queried via Redash) collapsed when COVID pushed weekly events from about 80M to nearly 2B. Read replicas, a message queue and NVMe storage only delayed the problem, and Citus and CDC tools like Debezium could not keep up. The team moved to ClickHouse using a custom Java Kafka consumer that turned JSON into structured columns, plus a manual backfill of historical events. They later added MaterializedPostgreSQL and Kafka syncs for production and CockroachDB CRM data, and built dbt daily per-user rollups that cut DAU queries from 3-4 minutes over 140B rows to about 1 second over 1.3B rows.
- How GitLab serves sub-second analytics to 50 million users
ClickHouse easyNovice
GitLab moved its user-facing product analytics from Postgres to ClickHouse after dashboards repeatedly hit its 15-second performance ceiling. Hierarchical multi-join queries over 100M+ rows dropped from 30–40 seconds to 0.24 seconds, and ClickHouse is now the default OLAP engine across GitLab.com, Dedicated and self-managed deployments. A hybrid data access layer routes queries between Postgres and ClickHouse, ingestion runs as TSV over HTTP plus an in-house CDC framework (Siphon), and materialized views are the main optimization tool. The team built and ran its own ClickHouse operator on object storage before moving SaaS to ClickHouse Cloud, and warns against self-managing unless required. It also flags poor visibility into background mutations as an ongoing operational pain.
- ClickPy at 2 Trillion rows: Scaling ingestion and fixing the past
ClickHouse mediumAdept
ClickPy, ClickHouse's free PyPI download analytics service, now holds over 2.2 trillion rows, and its cron-based ingestion script was replaced with ClickPipes without downtime. The new pipeline loaded data into a staging database with cloned schemas, a Null-engine raw table and a materialized view that holds all transformation logic. A fresh GCS bucket avoided reprocessing history, and the new pipeline ran in parallel and was validated by comparing daily row counts before cutover. That validation exposed missing historical days, which were fixed with lightweight deletes and per-day re-ingestion. Daily-aggregated materialized views could be deleted and repopulated by date, while non-daily aggregates such as monthly totals had to be dropped, rebuilt and recreated to avoid double counting.
- 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.