Skip to content

Storage model

How LoonFS is architected on object storage, with caching for acceleration and a split between embedded and server modes.

Understanding the LoonFS durable storage model

Section titled “Understanding the LoonFS durable storage model”

LoonFS uses object storage as its only required durable dependency, with a 2-layer cache (memory and SSD) for acceleration.

In embedded mode, LoonFS coordinates transactions directly with the object store, and compaction and indexing must be explicitly triggered. In server mode, the LoonFS server is designed to serialize many client writers into a single batched commit stream and run background compaction and indexing.

LoonFS is natively built on top of object storage, which is used to store both file content and metadata. The layout in object storage (not to be confused with the filesystem layout in a LoonFS namespace) looks like:

Storage layout

Each namespace belongs to one pool. Creating a namespace generates a pool; forks share their source’s pool. Content objects and upload records live under that pool’s prefix, so shared bytes do not belong to the namespace that first wrote them.

Metadata segments remain under the namespace that wrote them. A fork can read inherited segments under its source’s prefix, protected by its fork snapshot. New metadata and compaction output go under the writing namespace’s own prefix.

Small writes can initially live in the WAL, then be written to pool content objects when the WAL is folded. A file revision can reference shared byte ranges; it does not necessarily correspond to one separate content object.

Namespace collection reclaims metadata, while pool collection reclaims shared content once no retained references protect it. See Data lifecycle for how deletion, snapshots, and retention affect cleanup.