Skip to content- Sources: primary
- Summary: Datadog's first design assigned fixed Kafka partitions to leader and follower pairs that both kept hours of buckets and dedup IDs in RocksDB, doubling compute, and one partition split took about 1.5 hours of coordinated work. The second design used dynamic Kafka assignment and uploaded incremental RocksDB SSTables to blob storage so a new owner could rebuild state. The third makes storage reconcile partial aggregates, duplicate deliveries and late data, so the streaming layer resumes without restoring historical state.
- Why it matters: Stream processors that dedupe and accept late data can push durable correctness into an idempotent, mergeable store, so restarts and rebalances stop needing a warm-up.
- Background: Aggregating metrics means merging many tagged series into fewer ones, for example dropping a pod tag, over short time windows. Distribution metrics use DDSketch, a mergeable quantile sketch, so partial results can be combined without keeping every sample. The hard part is exactly-once results when brokers redeliver messages and data arrives late, which forces the aggregator to remember what it has already counted.