Evolving our real-time timeseries storage again: Built in Rust for performance at scale
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.
Related posts
- Deno KV internals: building a database for the modern web
Deno hardMasterDeno 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. To keep latency low, every atomic operation is non-interactive: a single bag of versionstamp checks, set/delete writes and conflict-free mutations that completes in one or two network trips. A sequencer assigns monotonic transaction sequence numbers, and an evaluator turns each batch into a dataflow graph of AND/MUX operations and evaluates it concurrently. Results are reused speculatively before a writer commits them to FoundationDB, which raises throughput without locks.
- 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.
- How we scale an open source, multi-tenant storage engine for Postgres written in Rust
Neon mediumAdept
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. Large tenants then get I/O that scales with dataset size, and they stop competing with small tenants for resources. All shards subscribe to the Paxos-based Safekeepers and filter WAL down to their own pages, while Postgres routes GetPage@LSN reads directly to the right shard by hashing, with no proxy in between. Tables need to exceed stripe size × shard count (e.g. 2GiB with 8 shards) to use full throughput. Planned work includes shard-aware Safekeepers to cut WAL fan-out cost and shard splitting, since shard count is currently fixed at tenant creation.
- Timeseries indexing at scale
Datadog Engineering mediumAdeptDatadog 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. The original Go service used SQLite for index definitions and the query log and RocksDB for Tagsets, Metrics and Indexes. It worked for predictable programmatic queries, but unpredictable user queries fell back to full scans, causing timeouts and manual index toil. The next-gen design drops SQLite, keeps RocksDB, and answers tag filters by intersecting posting lists of timeseries IDs. The two generations are compared on performance and reliability.
- Scale without limits: Multigres, OrioleDB, and dbarena
Supabase easyNoviceSupabase 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. It is in private alpha. OrioleDB, in public beta, is a storage engine that replaces heap storage with a page-level undo log, removing bloat and the need for VACUUM, and uses 64-bit transaction IDs to avoid wraparound; it reports up to 1.8x heap throughput on TPC-C-derived benchmarks and can be chosen per table with USING orioledb. dbarena publishes reproducible, cost-normalized benchmarks comparing Supabase, RDS and Cloud SQL.