---
title: "Evolving our real-time timeseries storage again: Built in Rust for performance at scale"
description: "Datadog's sixth-generation real-time timeseries database (RTDB) is a Rust rewrite that unifies two earlier engines, one for scalar metrics and one for DDSketch distributions, after earlier generations built on Cassandra, Redis, MDBM, a Go B+ tree and RocksDB."
url: "https://swe.quest/articles/evolving-our-real-time-timeseries-storage-again-built-in-rust-for-performance-cbd41a18b9630cd7"
canonical: "https://www.datadoghq.com/blog/engineering/rust-timeseries-engine/"
source: "Datadog Engineering"
published: "2025-08-04"
difficulty: "hard"
kind: "Case study"
reading_minutes: 21
tags: ["storage-engines","rust","performance","databases","concurrency"]
---

# Evolving our real-time timeseries storage again: Built in Rust for performance at scale

A post on [Datadog Engineering](https://swe.quest/sources/datadog.md), published 2025-08-04, 21 min read, Case study. Original: [https://www.datadoghq.com/blog/engineering/rust-timeseries-engine/](https://www.datadoghq.com/blog/engineering/rust-timeseries-engine/)

## Summary

Datadog's sixth-generation real-time timeseries database (RTDB) is a Rust rewrite that unifies two earlier engines, one for scalar metrics and one for DDSketch distributions, after earlier generations built on Cassandra, Redis, MDBM, a Go B+ tree and RocksDB. Its storage engine, Monocle, is an LSM tree with a worker-per-shard, thread-per-core design. Kafka intake tasks route data over per-shard MPSC channels to single-threaded Tokio shards, which keeps locks off the write path. Permit-based throttling and CoDel-based cost scheduling keep the system stable under load, and snapshots provide recovery. Datadog reports 60x higher ingestion throughput and 5x faster queries at peak scale.

Written by swe.quest, not by the author.

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

## Topics

- [Storage engines](https://swe.quest/tags/storage-engines.md) (Data & databases)
- [Rust](https://swe.quest/tags/rust.md) (Languages)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)
- [Concurrency](https://swe.quest/tags/concurrency.md) (Compilers & runtimes)

## Prerequisites

- LSM trees ([easy posts on Storage engines](https://swe.quest/tags/storage-engines.md?difficulty=easy))
- async Rust and Tokio ([easy posts on Concurrency](https://swe.quest/tags/concurrency.md?difficulty=easy))
- timeseries databases ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))
- sharding ([easy posts on Distributed databases](https://swe.quest/tags/distributed-databases.md?difficulty=easy))

## Keywords

Monocle, RTDB, Tokio, DDSketch, RocksDB, CoDel, Kafka, tachyonix

## Related posts

- [Deno KV internals: building a database for the modern web](https://swe.quest/articles/deno-kv-internals-building-a-database-for-the-modern-web-61dddae321d95df6.md): Deno · 2023-09-14 · Hard · 10 min read · Distributed databases, Consistency models, Storage engines, JavaScript
  Deno KV's production backend runs on FoundationDB, with a custom "transaction layer" in front of it that handles multi-tenant configuration, JavaScript-native types such as bigint sums, and cross-region replication.
- [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.
- [How we scale an open source, multi-tenant storage engine for Postgres written in Rust](https://swe.quest/articles/how-we-scale-an-open-source-multi-tenant-storage-engine-for-postgres-written-in-e5615307ced50afc.md): Neon · 2024-04-15 · Medium · 5 min read · Storage engines, PostgreSQL, Distributed databases, Multi-tenancy, Scaling
  Neon shards its Rust-based Pageserver storage layer by dividing each Postgres relation's 8KiB block numbers into stripes (default 256MiB) and hashing each stripe to a Pageserver.
- [Timeseries indexing at scale](https://swe.quest/articles/timeseries-indexing-at-scale-cbd6b9bd5fe12d35.md): Datadog Engineering · 2024-06-28 · Medium · 20 min read · Storage engines, Search, Databases, Observability, Scaling
  Datadog replaced its timeseries index, which auto-generated materialized indexes from a log of slow queries, with an inverted index that unconditionally indexes every metric;tag pair, much like search engines map words to documents.
- [Scale without limits: Multigres, OrioleDB, and dbarena](https://swe.quest/articles/scale-without-limits-multigres-orioledb-and-dbarena-9dcab6dd01f060fc.md): Supabase · 2026-10-02 · Easy · 4 min read · PostgreSQL, Storage engines, Replication, Performance engineering
  Supabase launched three Postgres scaling efforts. Multigres, from the Vitess team, adds built-in connection pooling and automated failover across three availability-zone nodes, using a consensus protocol over synchronous replication so no committed write is lost.

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)
