How we measure data completeness at scale
Datadog measures ingestion data completeness per customer by splitting pipelines into segments and recording create and acknowledgment events keyed by unique payload IDs in 60-second time buckets. This makes counts idempotent under retries and reordering. Watermarks were rejected because customers can send arbitrarily delayed data and pipelines contain loops and replays. Segment ratios are multiplied along sequential paths and volume-weighted across parallel branches. Cost and resilience come from per-customer sampling driven by a two-stage load-shedding bulletin, a custom lock-free in-memory store with a worker-per-shard design, and no dependency on Kafka or external databases, so the system kept running through a Kafka incident.
Related posts
- Ensuring reliable OpenTelemetry ingestion at scale
ClickHouse mediumAdept
ClickHouse's LogHouse OpenTelemetry pipeline, ingesting 50 million events per second, absorbs database backpressure by failing over to S3 rather than buffering in memory, local WALs or Kafka. Collector file_storage WALs forced StatefulSets, drained slowly (about 4 hours per TiB) and queued fresh data behind backlog in FIFO order. The final design uses the OTel failoverconnector to route to ClickHouse first and spill to S3 only under backpressure, which limits PUT costs to outage windows. A separate scale-to-zero collector replays spilled blobs via SQS event notifications. Key details include disabling the ClickHouse exporter's sending queue so errors reach the connector, keeping inline retries, enabling the queue on the S3 exporter, and spreading keys across a wide keyspace to avoid prefix throttling.
- How we scaled metrics aggregation by moving durable state into storage
Datadog Engineering mediumAdeptDatadog's metrics aggregation service, which merges DDSketch distributions to reduce tag dimensions, went through three generations as volume grew roughly 10× each time. Static leader-follower partitions with local RocksDB doubled compute and needed manual partition splits. Dynamic Kafka assignment with incremental SSTable snapshots to blob storage and time-windowed lazy restore improved recovery and enabled autoscaling, but state recovery then became the bottleneck. The third generation makes streaming aggregation and deduplication best-effort. Both storage tiers reconcile partial aggregates, duplicates and late data during reads and compaction, so workers can restart at the live edge without restoring hours of state and can be provisioned for current traffic.
- How to Reliably Scale Your Data Platform for High Volumes
Shopify Engineering mediumAdeptShopify's Data Platform Engineering team prepared Tier 1 and Tier 2 ingestion and query services for a forecast near-doubling of BFCM 2020 traffic with a five-step reliability process. The steps were to define each service's primary objective (a freshness SLO for the Longboat batch ingester, a latency SLO for Reportify), identify tunable knobs such as job frequency, overlap interval, GKE CPU/memory, BigTable node pools and ProxySQL pools, and constrain those knobs to simulate N-times load. Teams then validated that every alert was actionable with simple runbooks and decided where to scale or tune. The exercise led to cluster scale-ups and job and query tuning, and BFCM ran with a 150% throughput increase and only minor self-healing incidents.
- Partition Finalization in Pinterest’s Next-Generation DB Ingestion Framework
Pinterest Engineering hardMasterPinterest's streaming CDC ingestion (Kafka, Flink, Iceberg, Spark) lost the implicit "partition complete" signal that batch loads provided, so it now derives a partition finalization watermark from event time. Each Flink checkpoint records min/max event time and a mergeable t-digest percentile sketch (a few hundred bytes) in the Iceberg snapshot summary. A post-commit hook then computes a monotonic, non-regressing watermark, by default the minimum of per-commit minimums over the last X commits rounded down to the hour, and stores it as a table property that downstream sensors can wait on. The Spark upsert job copies the watermark to the base table. The work is built on generic Accumulator and CommitProcessor extension points in an extensible Flink-Iceberg sink, and tables can choose percentile-based policies to trade completeness for freshness.
- Scaling down to speed up: How we improved efficiency of live process metrics by 100x
Datadog Engineering mediumAdeptDatadog cut real-time process and container metric traffic by about 100x by enabling 2-second live collection only on hosts whose processes a user is actually viewing (at most 50 per user), instead of on every host in the tenant. Sorting switched to the existing 10-second data, which removed the need to hold all live metrics in a single server's memory. Host subscriptions are published over Kafka at 1-second intervals to the intake service, which keeps a TTL-based in-memory cache of viewed hosts. Peak volume fell from 500,000 to 5,000 messages per second, the live data service shrank by about 98% (over 600 cores and 1 TiB of memory freed), and Agent CPU usage dropped about 2%.