Introducing Husky, Datadog’s third-generation event store
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.
Related posts
- Inside Husky’s query engine: Real-time access to 100 trillion events
Datadog Engineering hardMasterHusky, Datadog's third-generation event store, serves interactive queries over more than 100 trillion events through four multi-tenant services: a planner that splits queries into time-based steps, orchestrators that fetch fragment metadata from FoundationDB and prune with zone maps, a metadata service, and readers that execute against fragments in blob storage. Zone-map pruning cuts downstream work by about 30% on average and up to 60% for structured events. Readers use a Volcano-style iterator model over small row groups of a few hundred rows. Lazy decoding, min/max metadata and cost-ordered predicate evaluation let them skip whole row groups and columns. Text and wildcard search run on per-fragment segments holding posting-list bitsets and n-grams, keeping blob reads and compute to a minimum.
- Husky: Exactly-once ingestion and multi-tenancy at scale
Datadog Engineering hardMasterHusky, Datadog's columnar event store, achieves exactly-once ingestion and cost-efficient multi-tenancy by routing events deterministically to Kafka partition groups (shards), so deduplication only has to happen within a shard. Time-bounded, immutable Shard Placements are allocated per tenant by a Sharding Allocator that uses FoundationDB transactions to give every Shard Router node the same answer. An Autosharder resizes each tenant's shard count from byte-throughput metrics. Consistent hashing with wraparound and shard exclusions keeps placement churn minimal, and a balancer counters hotspots. Limiting how many tenants each writer handles also cuts the number of blob-storage files and compaction work.
- Husky: Efficient compaction at Datadog scale
Datadog Engineering hardMasterHusky, Datadog's observability event store layered over object storage, keeps query cost low by controlling fragment count and layout through streaming compaction. Writers flush small sorted fragments into time-bucketed tables. Compactors lazily run size-tiered k-way merges, waiting until a few dozen fragments are available, which cuts CPU and object-store API costs by an order of magnitude. Metadata is swapped atomically in FoundationDB. A custom columnar format with per-column headers and fixed-size row groups lets each compaction use one GET per input, saturate the CPU and run in bounded memory, and sort schemas let queries skip fragments using only their metadata.
- Evolving the Backend Storage for Platform Metrics
Heroku Engineering mediumAdeptHeroku 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.
- Scaling our Observability platform beyond 100 Petabytes by embracing wide events and replacing OTel
ClickHouse mediumAdept
ClickHouse's internal LogHouse platform grew from 19 PiB to over 100 PB of uncompressed logs (about 500 trillion rows), mostly by replacing the OpenTelemetry pipeline for ClickHouse server telemetry with SysEx. SysEx is a pull-based Go exporter that copies system tables byte-for-byte from customer pods into LogHouse in ClickHouse's Native format. It assigns pods to scrapers with a hash ring and queries a sliding time window trailing real time by about five minutes, so internal buffers flush before rows are read. Schema drift is handled with hashed, versioned tables unified through the Merge engine. The OTel collectors needed 800+ cores for 2M logs/s and still dropped events, while SysEx ships 37M logs/s on about 70 cores with no edge loss. HyperDX now replaces the team's Grafana-based UI.