FASTEST ORDERED STORAGE FOR .NET

ZoneTree documentation

Add ordered, persistent storage to your .NET application. Open your first tree, design keys around your queries, and choose how your data reaches disk.

One tree, one keyspace
Your comparer defines key order. Iterators seek and scan that order in either direction.
Runs inside your process
Read and write through C# APIs. Persistent data lives in a directory you choose.
Your application's data model
Build secondary indexes, queues, or event stores by choosing keys and coordinating writes.

Your first tree

C# / .NET
dotnet add package ZoneTree
using ZoneTree;

using var tree = new ZoneTreeFactory<int, string>()
    .SetDataDirectory("data/my-tree")
    .OpenOrCreate();
using var maintainer = tree.CreateMaintainer();

tree.Upsert(42, "Hello ZoneTree");
if (tree.TryGet(42, out var value))
    Console.WriteLine(value);

Keep the maintainer alive with the tree to schedule background merges and clean inactive caches. Background maintenance

A PRACTICAL LEARNING PATH

From a working example to a reliable system.

New to the engine? Follow these three guides in order.

FIND THE GUIDE FOR THE JOB

What are you working on?

Jump to the API, design decision, or operational task in front of you.

Read, write & coordinate

Choose the right operation, from a single key to a multi-key transaction.

Design keys & queries

Make the key layout serve your lookups, ordered scans, and indexes.

Keep data recoverable

Define the durability boundary and how you will recover persistent data.

Storage costs

Work out what drives disk reads, rewrite work, and memory use.

Maintenance

Background merges, bottom-segment compaction, and inactive-cache cleanup.

Partitioning & replication

Connect local trees to partition ownership, replication, and replica seeding.