Architecture

Not a black box

From FUSE to VFS, from metadata to Chunk / Block / Slice, from object IO to compaction and GC — BrewFS separates filesystem semantics, metadata transactions, object-block storage, and background maintenance into clear layers that can be inspected, benchmarked, debugged, and extended.


Overview

Overall architecture

APPApplicationsAgents · AI Jobs · Containers · CLI · SDK
↓ POSIX-like FUSE
VFSVFS Layerpath · inode · handle · read/write · rename · truncate
METAMetadata LayerSQLx · Redis · etcd · TiKV
Namespace · Inode · Slice · Transaction
DATAChunk EngineChunk · Block · Slice
Cache · Compaction · GC
OBJObject BackendLocalFS / S3-compatible storage

Data Path

Read & write pipelines

BrewFS exposes the IO path as a clear Rust pipeline — no hidden magic between a file write and an object block.

Write Path

FUSE write
VFS::write
FileWriter::write_at
Chunk split
SliceState append
Auto flush
DataUploader
ObjectBlockStore
Metadata commit

Read Path

FUSE read
VFS::read
FileReader
Load Slice metadata
Map offset → object blocks
Read object backend
Merge slices / zero-fill holes
Return bytes

Layers

Six architecture layers

01
CLI / DAEMON

CLI / Daemon

Starts BrewFS, loads configuration, mounts the filesystem, and exposes operational commands.

02
KERNEL

FUSE

Receives filesystem operations from the kernel and maps them into BrewFS VFS operations.

03
SEMANTICS

VFS

Handles path lookup, inode management, file handles, rename, truncate, read, and write.

04
STATE

Metadata

Stores namespace, directory entries, inode attributes, file size, chunk metadata, slice descriptors, and transactional state.

05
ENGINE

Chunk Engine

Manages Chunk / Block / Slice layout, read/write mapping, sparse holes, compaction, and GC.

06
DURABLE

Object Backend

Stores file data as object blocks on LocalFS or S3-compatible storage.


COMPACTION & GC

Keeping the object layout clean

BrewFS writes data in Slice form. Overwrites, truncates, and file updates may leave older slices and object blocks behind. Compaction reduces slice fragmentation, while GC removes object data that is no longer referenced.

OBSERVABILITY

Designed to be observed

Statistics, tracing, logs, profiling, benchmark tools, and control-plane commands help developers understand filesystem behavior under real workloads.

statstracingprofilingcontrol plane