architecture12 min read

How we scaled metrics aggregation by moving durable state into storage | Datadog

  • Datadog
  • Kafka
  • RocksDB

AI Summary

Datadog describes the evolution of their metrics aggregation system across three generations. They transitioned from static partition ownership to transferable state, and finally to a design where the streaming layer delegates durable reconciliation to the storage layer. This shift allows the streaming service to resume at the live edge without needing to reconstruct hours of historical aggregation state, significantly improving scalability and recovery times.

Key Takeaways

  • The first generation used static partitioning with RocksDB, which made horizontal scaling difficult and manual intervention necessary.
  • The second generation introduced transferable state using blob storage for snapshots, but state recovery remained a bottleneck during large backfills.
  • The third generation offloads reconciliation of late data and duplicates to the storage layer, allowing the streaming layer to be stateless and scale based on current traffic.

Why it matters

This article provides a clear architectural case study on how to decouple state management from processing logic in high-throughput distributed systems, demonstrating how moving state to storage can resolve scaling bottlenecks caused by state recovery.

Conversation0

What would you add from your experience?

Checking your session…

Every good conversation starts with one perspective.