Skip to content

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

Heroku Engineering 6 min read Case study mediumAdept

Evolving the Backend Storage for Platform Metrics

Heroku migrated the time-series store behind MetaaS, its internal metrics service, from self-managed Apache Cassandra to AWS DynamoDB without user-visible impact. MetaaS ingests a couple hundred thousand observations per second into Kafka and aggregates them with stream-processing jobs, writing tens of thousands of points per second to the database. The migration used parallel dual-writes from Kafka and GitHub Scientist-style shadow reads, ramped to 100% of traffic, to catch edge cases. TTL-based retention meant no data backfill was needed: they waited for old Cassandra data to expire, then incrementally cut reads over. p99 query latency dropped from a variable 20–80 ms to a steady 15 ms, and costs fell.

Related posts

  • Introducing Husky, Datadog’s third-generation event store

    Datadog Engineering mediumAdept

    Husky is Datadog's third-generation event store, an unbundled, schemaless, vectorized column store that separates compute from storage on top of S3 and a FoundationDB-backed metadata store. The first-gen Logs system broke down through multi-tenant cascading failures. The second gen fixed that with custom sharding but couldn't handle tenant bursts or new product needs, so ingestion was split into stateless Writers, LSM-style distributed Compactors and Readers that coordinate through a strictly serializable metadata store. Because query capacity is decoupled from ingestion, queries can burst across many Readers or be isolated by product or tenant, for example keeping automated monitor queries apart from human ones.

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

  • Zero-Copy Migration: How Yelp Moved Its Cassandra Fleet Between Kubernetes Clusters

    Yelp Engineering mediumAdept

    Yelp moved roughly 1000 Cassandra pods and nearly a petabyte of data from self-managed Kubernetes clusters to Amazon EKS without streaming any data. EBS volumes are bound to an Availability Zone, not to a cluster, so the team pre-created PVs and PVCs in EKS pointing at the existing EBS volume IDs. They then rolled pods one at a time: delete the legacy pod, block it from rescheduling, and let the waiting EKS pod attach the freed volume and rejoin the ring. Both custom operators were paused with a skipReconciliation flag during the handoff, and rollback is the same pointer swap in reverse. The procedure was validated by hand first, then turned into an ~800-line bash script with Claude. The write-up covers pitfalls including stale VolumeAttachment objects, IAM drift that broke backups, and months-disabled repairs uncovered along the way.

  • 100x Faster: GraphQL Hive migration from Elasticsearch to ClickHouse

    ClickHouse easyNovice

    GraphQL Hive replaced Elasticsearch with ClickHouse for storing per-request GraphQL monitoring data (consumer, requested fields, latency, request body) after query latency degraded with data growth and one large tenant slowed queries for smaller ones. On a 20M-row benchmark where one user owned half the rows, percentile queries took ~10s on Elasticsearch, ~5s on InfluxDB (which struggled with high cardinality), ~3s on TimescaleDB and ~100ms on ClickHouse. Druid was skipped as too complex. Because data had a 30-day TTL, the team dual-wrote to both stores for a month and then switched reads with zero downtime, reporting a 100x average improvement and growth from millions to billions of rows per month. They are now moving to ClickHouse Cloud for sharding and replication.

  • Building an Observability Solution with ClickHouse at Dash0

    ClickHouse hardMaster

    Dash0 stores all OpenTelemetry metrics, logs and spans in ClickHouse, using PostgreSQL only for customer settings, so signals can be joined and correlated in one system. The setup tiers storage with 1-2 days on local disk, then AWS S3 plus a local cache, driven by TTL moves, and keeps metrics for 13 months. Tables are ordered by a ResourceHash before Timestamp for better filtering and compression, with daily partitions bounding time ranges, and the cluster runs as a single shard with multiple replicas. Metric metadata is deduplicated into an AggregatingMergeTree table keyed by MetricHash with FirstSeen/LastSeen tracking, and queries against it must use GROUP BY or FINAL because merges are not guaranteed to have happened.

The quest for software engineering knowledge.

Look:
Layout: