---
title: "Husky: Exactly-once ingestion and multi-tenancy at scale"
description: "Husky, 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."
url: "https://swe.quest/articles/husky-exactly-once-ingestion-and-multi-tenancy-at-scale-e0787135af05f4f3"
canonical: "https://www.datadoghq.com/blog/engineering/husky-deep-dive/"
source: "Datadog Engineering"
published: "2023-02-22"
difficulty: "hard"
kind: "Case study"
reading_minutes: 21
tags: ["multi-tenancy","distributed-systems","stream-processing","messaging","analytics"]
---

# Husky: Exactly-once ingestion and multi-tenancy at scale

A post on [Datadog Engineering](https://swe.quest/sources/datadog.md), published 2023-02-22, 21 min read, Case study. Original: [https://www.datadoghq.com/blog/engineering/husky-deep-dive/](https://www.datadoghq.com/blog/engineering/husky-deep-dive/)

## Summary

Husky, 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.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Multi-tenancy](https://swe.quest/tags/multi-tenancy.md) (Architecture & design)
- [Distributed systems](https://swe.quest/tags/distributed-systems.md) (Distributed systems)
- [Stream processing](https://swe.quest/tags/stream-processing.md) (Data & databases)
- [Queues & messaging](https://swe.quest/tags/messaging.md) (Backend & APIs)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)

## Prerequisites

- Kafka partitions ([easy posts on Queues & messaging](https://swe.quest/tags/messaging.md?difficulty=easy))
- consistent hashing
- multi-tenant data pipelines ([easy posts on Data pipelines](https://swe.quest/tags/data-pipelines.md?difficulty=easy))
- exactly-once semantics

## Keywords

Husky, Datadog, Kafka, FoundationDB, Shard Router, Sharding Allocator, Autosharder

## Related posts

- [Introducing Husky, Datadog’s third-generation event store](https://swe.quest/articles/introducing-husky-datadog-s-third-generation-event-store-c33e11fe78ed46cc.md): Datadog Engineering · 2022-05-17 · Medium · 12 min read · Storage engines, Multi-tenancy, Distributed databases, System design, Analytics & OLAP
  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.
- [Inside Husky’s query engine: Real-time access to 100 trillion events](https://swe.quest/articles/inside-husky-s-query-engine-real-time-access-to-100-trillion-events-a64c982f47949261.md): Datadog Engineering · 2025-10-01 · Hard · 27 min read · Query engines, Storage engines, Search, Observability, Multi-tenancy
  Husky, 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.
- [Husky: Efficient compaction at Datadog scale](https://swe.quest/articles/husky-efficient-compaction-at-datadog-scale-eba7e7c7e1831aee.md): Datadog Engineering · 2025-01-29 · Hard · 18 min read · Storage engines, Analytics & OLAP, Observability, Performance engineering, Distributed databases
  Husky, Datadog's observability event store layered over object storage, keeps query cost low by controlling fragment count and layout through streaming compaction.
- [Rapidly scaling online storage to serve over 1 billion ChatGPT users (Part II)](https://swe.quest/articles/rapidly-scaling-online-storage-to-serve-over-1-billion-chatgpt-users-part-ii-1fe17c5ac1f7349f.md): OpenAI · 2026-10-23 · Medium · 18 min read · Multi-tenancy, Distributed databases, Scaling, Capacity planning, Cloud platforms
  OpenAI's Habitat storage platform went from one shared Azure Cosmos DB container, to per-use-case dedicated containers, and back to a shared multi-tenant container.
- [How we built reliable log delivery to thousands of unpredictable endpoints](https://swe.quest/articles/how-we-built-reliable-log-delivery-to-thousands-of-unpredictable-endpoints-0cf63fb1f4da9cac.md): Datadog Engineering · 2025-06-23 · Medium · 14 min read · Observability, System design, Multi-tenancy, Resilience, Queues & messaging
  Datadog's Log Forwarding avoids head-of-line blocking from Kafka's per-partition FIFO ordering by moving logs out of Kafka early into cloud object storage, grouped by destination.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
