HerokuDavid MurrayProblem & solution
Evolving the Backend Storage for Platform Metrics
Summary
Heroku migrated MetaaS, its internal Metrics as a Service platform metrics backend, from self-hosted Apache Cassandra to AWS’s DynamoDB. MetaaS collects application observations, aggregates them into per-application, per-minute statistics such as median, maximum, and 99th-percentile response time, and stores time-series data for dashboard metrics, alerting, and autoscaling. The migration first duplicated Kafka stream-processing writes into DynamoDB, then used “Science Mode” to compare Cassandra and DynamoDB read results in production without changing returned data. After edge cases were fixed and results matched, retention-period TTL expiry avoided a separate historical data transfer, while gradual query cutovers provided another safeguard. Since 100% of MetaaS queries moved to DynamoDB in May of last year, DynamoDB has remained reliable at scale and been faster and cheaper than the Cassandra clusters, with no noticeable effect on users.
Context
MetaaS depended on home-grown Cassandra clusters whose routine maintenance had become increasingly difficult, and a particularly rough upgrade in a test environment showed that operational changes were needed. The system handled hundreds of thousands of observations per second, tens of thousands of writes per second, and thousands of read queries per second at peak.
Approach / What changed
The migration used parallel stream-processing jobs to write the same time-series data to DynamoDB, followed by Science Mode dual reads that compared Cassandra and DynamoDB results without changing responses. After fixing edge cases, the team relied on TTL-based retention expiry instead of moving historical data, then gradually shifted production reads to DynamoDB.
Takeaways
MetaaS processes a couple hundred thousand observations per second and stores many terabytes of time-series data, with tens of thousands of writes and several thousand reads per second at peak.
Science Mode queried DynamoDB in the background while Cassandra continued serving responses, exposing edge cases before the new backend became authoritative.
TTL-based retention meant older Cassandra data could age out naturally, avoiding a lift-and-shift; DynamoDB was later reported to be faster, cheaper, and reliable at scale.
Source and freshness
- Source
- heroku.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.