Skip to content
STACK IT FAST

SeaweedFS

Curated OSSClassicDistributed Blob & File Storage2-5 People

Audited from github.com/seaweedfs/seaweedfs

SeaweedFS is a distributed object store, file system, and data lake storage engine designed to store billions of files with O(1) disk access.

Language
Go
Database
RocksDB
Hosting
Docker
License
Apache-2.0
Running for
8 years
Team
2-5 People

Why this architecture

Decoupling directory metadata from physical volume storage eliminates central metadata bottlenecks, enabling massive horizontal scaling for small and large files alike.

Tech stack by layer

6 technologies · audited Sep 17, 2026
Backend & APIs
  • GoCore systems language powering the Master, Filer, and Volume server daemons in go.mod.
  • RustHigh-performance native volume server engine implemented in seaweed-volume/Cargo.toml.
Data & Persistence
  • S3S3-compatible object storage API layer supporting buckets, multipart uploads, and lifecycle rules.
  • RocksDBHigh-speed embedded key-value store used as the default metadata engine for Filer nodes.
Infrastructure & Deploy
  • DockerDocker Compose orchestration environments in docker/compose for multi-node clusters.
  • KubernetesProduction Kubernetes Helm charts in k8s/charts for scalable volume and master daemon sets.

SeaweedFS architecture diagram

Open SVG
SeaweedFS architecture diagramS3 clients → S3 gateway (S3 API); FUSE / WebDAV → Filer (paths); S3 gateway → Filer (objects); Filer → Filer metadata (path to needle); Filer → Masters (assign fid); Filer → Volume servers (read / write); Masters → Volume servers (allocate); Volume servers → Volume files (append needles)CLIENTSSERVICESWORKERS & JOBSDATA & STORAGES3 clientsAWS SDKs · CLIFUSE / WebDAVmountS3 gatewayweed s3Filerweed filerMastersRaftVolume serversGo / Rust engineFiler metadataRocksDB · Postgres · FDBVolume files.dat / .idx · ECobjectsassign fidS3 APIpathsread / writeallocateappend needlespath to needle
How the main components of SeaweedFS connect, drawn from the audited repository.
Diagram as text
  • S3 clients (AWS SDKs · CLI) → S3 gateway (weed s3): S3 API
  • FUSE / WebDAV (mount) → Filer (weed filer): paths
  • S3 gateway (weed s3) → Filer (weed filer): objects
  • Filer (weed filer) → Filer metadata (RocksDB · Postgres · FDB): path to needle
  • Filer (weed filer) → Masters (Raft): assign fid
  • Filer (weed filer) → Volume servers (Go / Rust engine): read / write
  • Masters (Raft) → Volume servers (Go / Rust engine): allocate
  • Volume servers (Go / Rust engine) → Volume files (.dat / .idx · EC): append needles

Key architectural decisions

5 decisions
  1. 01

    Haystack-inspired architecture: decoupling metadata from chunk storage

    SeaweedFS separates directory metadata (Filer) from binary blob storage (Volume Servers). Master nodes maintain volume layouts via Raft, while Volume servers store raw file chunks in append-only files with O(1) disk lookups.

  2. 02

    Pluggable Filer metadata backends (RocksDB, PostgreSQL, FoundationDB)

    The Filer layer supports swappable metadata stores configured in filer.toml (RocksDB for single-node, PostgreSQL or FoundationDB for distributed metadata), allowing scaling from embedded servers to multi-terabyte directories.

  3. 03

    Native S3 and POSIX FUSE filesystem interfaces

    SeaweedFS natively presents data as S3 object buckets, POSIX file mounts via FUSE, Hadoop HDFS-compatible file systems, and WebDAV endpoints without requiring third-party translation proxies.

  4. 04

    Erasure coding for cold storage space efficiency

    To reduce hardware storage costs, older volume files can be encoded using Reed-Solomon erasure coding (8+4 or 10+4), reducing replication overhead from 3x to 1.3x while maintaining fault tolerance.

  5. 05

    Rust volume server rewrite for zero-overhead disk I/O

    The seaweed-volume project (seaweed-volume/Cargo.toml) ports the disk I/O intensive volume daemon to Rust, eliminating Go GC pauses and optimizing kernel page cache interactions.

How SeaweedFS is built

How SeaweedFS is structured

SeaweedFS is structured as a distributed storage platform written in Go (go.mod) with native performance extensions in Rust (seaweed-volume/Cargo.toml). The repository implements a modular, three-tier architecture modeled after Facebook's Haystack paper and Google's Chubby lock manager:

  • cmd/: Command-line binaries and entrypoints (weed), including subcommands for master servers, volume servers, filers, S3 gateways, and administrative maintenance utilities.
  • seaweed-volume/: A high-performance Rust reimplementation of the volume storage daemon (seaweed-volume/Cargo.toml), designed for zero-GC, low-latency disk I/O and direct kernel buffer cache integration.
  • docker/: Comprehensive Docker configurations, including test harnesses for RocksDB, FoundationDB (docker/Dockerfile.foundationdb_large), and Tarantool metadata engines.
  • k8s/charts/: Production Kubernetes Helm charts for deploying Master nodes, Filer daemonsets, and Volume statefulsets across cloud clusters.

Frontend

SeaweedFS includes an administrative dashboard and file browser embedded into the master and filer daemons. The UI provides visual cluster topology status, volume distribution heatmaps, active Raft leader indications, and an interactive file navigation explorer for inspecting directories and downloading stored objects directly in a web browser.

Backend & APIs

The core daemon is compiled into a single executable (weed) that can launch individual roles or consolidated all-in-one nodes:

  1. Master Server (weed master): Coordinates cluster state, assigns new file IDs (needle keys), manages volume allocation, and runs Raft consensus across a cluster of master instances to ensure leader election and split-brain prevention.
  2. Volume Server (weed volume): Manages physical storage. Volume servers allocate large 32GB contiguous volume data files. When a file is uploaded, it is written as a "needle" (containing a header, payload, and checksum) to the volume file. The volume server maintains an in-memory index mapping needle IDs to byte offsets, enabling O(1) disk seek operations.
  3. Filer Server (weed filer): Provides directory hierarchies, file attributes, and POSIX path abstractions on top of the raw volume IDs. The filer translates path lookups (e.g., /photos/vacation/lake.jpg) into volume and needle pointers.
  4. S3 Gateway (weed s3): Exposes an Amazon S3-compatible HTTP API, supporting bucket creation, object lifecycle policies (S3_LIFECYCLE_REDESIGN.md), multipart uploads, and presigned URLs.

Data & persistence

SeaweedFS separates binary data persistence from path metadata persistence:

  • Volume Storage: Raw file payloads are stored in append-only volume containers (.dat and .idx files). Deletions simply mark needles as deleted; background vacuum processes rewrite fragmented volumes to reclaim disk space.
  • Erasure Coding: Inactive or historical volumes can be compressed and encoded using Reed-Solomon erasure coding (weed volume.ec). An erasure-coded volume is split into 8 data shards and 4 parity shards, reducing disk footprint from standard 3x replication to only 1.5x while tolerating multiple node failures.
  • Filer Metadata Engines: The Filer metadata store is pluggable (docker/filer.toml). Operators can choose:
    • RocksDB or LevelDB: Ideal for standalone or edge installations requiring high local throughput.
    • PostgreSQL / MySQL: Suitable for medium-scale enterprise deployments leveraging existing relational databases.
    • FoundationDB or Cassandra: Designed for global, distributed metadata trees spanning millions of directories.

Build, test & deploy

The build and deployment pipeline is automated across multiple tools:

  • Compilation: Compiled using Go 1.23+ (go.mod), with optional CGO flags enabled when linking native RocksDB libraries. Rust components in seaweed-volume compile via Cargo.
  • Testing: End-to-end integration tests in docker/ run S3 compatibility suites (docker/Dockerfile.s3tests) asserting Amazon S3 API parity against official S3 test fixtures.
  • Containerization: Official Docker images (seaweedfs/seaweedfs) and Helm charts in k8s/charts/ automate deployment of Master StatefulSets, Volume DaemonSets, and autoscaling Filer deployments.

Self-hosting notes

Operating SeaweedFS in production is straightforward:

  1. For development, run a combined instance: weed server -dir=/data -s3.
  2. For production clusters, deploy 3 Master nodes for Raft quorum, multiple Volume servers mounted on high-capacity NVMe/HDD storage arrays, and stateless Filer nodes connected to a replicated PostgreSQL or FoundationDB metadata database.
  3. Network ports: Expose port 9333 for Master HTTP/gRPC, port 8080 for Volume HTTP, port 8888 for Filer, and port 8333 for the S3 gateway.

What to copy (and what not to)

Architectural patterns to emulate from SeaweedFS:

  • Separation of metadata from binary chunk storage: Decoupling directory trees from bulk storage eliminates central metadata bottlenecks, preventing the master from becoming an I/O bottleneck.
  • Haystack needle bundling for small files: Storing millions of small files inside large contiguous volume files avoids inode exhaustion and filesystem fragmentation.
  • Pluggable metadata backends: Allowing operators to select their preferred metadata engine (RocksDB, PostgreSQL, FoundationDB) makes storage systems adaptable across diverse infrastructure requirements.

Avoid deploying complex multi-tier distributed storage systems if standard managed object storage (such as Amazon S3 or Cloudflare R2) is readily available and financially practical, as managing distributed disks, data rebalancing, and volume compaction requires continuous operational attention.

Sources & repo audit

Audited
Sep 17, 2026
Commit
66f1754
License
Apache-2.0

Independent analysis of repository at github.com/seaweedfs/seaweedfs. Spotted an inaccuracy? Use the claim form to request a correction.

Show this stack on your README or website
Tech stack of SeaweedFS
[![Tech stack of SeaweedFS on STACK IT FAST](https://stackitfast.com/badge/seaweedfs.svg)](https://stackitfast.com/project/seaweedfs)

Paste it into your README. It shows your current stack and links to this page.

Use this stack

Scaffold it with your agent

Paste this prompt into Claude Code, Cursor, Windsurf or AGY to start a project with SeaweedFS's architecture.

  1. 1Copy the promptThe full markdown spec, with every layer and decision.
  2. 2Open your AI toolClaude Code, Cursor, Windsurf or Copilot, in a new repo.
  3. 3Paste and scaffoldUse it as the first instruction; review before you ship.
use-this-stack.md · 58 lines · 5.9 KB
# MISSION: Scaffold "SeaweedFS" Production Architecture
You are an expert Senior Staff Software Architect and Full-Stack Engineer. Your mission is to scaffold and implement a production-grade, highly reliable, and modular codebase following the proven architecture of **SeaweedFS**.
---
## 1. PROJECT SPECIFICATIONS & BENCHMARK
- **Reference Architecture**: SeaweedFS
- **What It Does**: SeaweedFS is a distributed object store, file system, and data lake storage engine designed to store billions of files with O(1) disk access.
- **Domain & Category**: Distributed Blob & File Storage
- **Production Scale**: 2-5 People
- **Development Mode**: CLASSIC
- **Architectural Rationale**: Decoupling directory metadata from physical volume storage eliminates central metadata bottlenecks, enabling massive horizontal scaling for small and large files alike.
- **Live Website Reference**: https://seaweedfs.github.io
- **Source Repository**: https://github.com/seaweedfs/seaweedfs
---
## 2. PRODUCTION TECH STACK
- **Full Stack Array**: Go, Rust, Docker, Kubernetes, S3, RocksDB
- **Primary Language(s)**: Go, Rust
- **License of the reference repo**: Apache-2.0
- **Backend & APIs**: Go — Core systems language powering the Master, Filer, and Volume server daemons in go.mod.; Rust — High-performance native volume server engine implemented in seaweed-volume/Cargo.toml.
- **Data & persistence**: S3 — S3-compatible object storage API layer supporting buckets, multipart uploads, and lifecycle rules.; RocksDB — High-speed embedded key-value store used as the default metadata engine for Filer nodes.
- **Infrastructure & deploy**: Docker — Docker Compose orchestration environments in docker/compose for multi-node clusters.; Kubernetes — Production Kubernetes Helm charts in k8s/charts for scalable volume and master daemon sets.
---
## 3. KEY ARCHITECTURAL DECISIONS (audited from https://github.com/seaweedfs/seaweedfs @ 66f1754)
1. **Haystack-inspired architecture: decoupling metadata from chunk storage**: SeaweedFS separates directory metadata (Filer) from binary blob storage (Volume Servers). Master nodes maintain volume layouts via Raft, while Volume servers store raw file chunks in append-only files with O(1) disk lookups.
2. **Pluggable Filer metadata backends (RocksDB, PostgreSQL, FoundationDB)**: The Filer layer supports swappable metadata stores configured in filer.toml (RocksDB for single-node, PostgreSQL or FoundationDB for distributed metadata), allowing scaling from embedded servers to multi-terabyte directories.
3. **Native S3 and POSIX FUSE filesystem interfaces**: SeaweedFS natively presents data as S3 object buckets, POSIX file mounts via FUSE, Hadoop HDFS-compatible file systems, and WebDAV endpoints without requiring third-party translation proxies.
4. **Erasure coding for cold storage space efficiency**: To reduce hardware storage costs, older volume files can be encoded using Reed-Solomon erasure coding (8+4 or 10+4), reducing replication overhead from 3x to 1.3x while maintaining fault tolerance.
5. **Rust volume server rewrite for zero-overhead disk I/O**: The seaweed-volume project (seaweed-volume/Cargo.toml) ports the disk I/O intensive volume daemon to Rust, eliminating Go GC pauses and optimizing kernel page cache interactions.
---
## 4. NON-NEGOTIABLE ARCHITECTURAL GUARDRAILS
1. **Monorepo & Modular Separation**:
   - Structure as a Turborepo monorepo with strict package boundaries:
     - `apps/web`: Application UI, routing, layouts, and server endpoints.
     - `packages/ui`: Shared design tokens, CSS variables, and Radix UI primitive components.
     - `packages/db`: Database schemas, client singleton, declarative migrations, and seed scripts.
     - `packages/config`: Shared TypeScript, ESLint, and build configurations.
2. **Strict Type Safety & Zero `any` Policy**:
   - Enable `strict: true`, `noImplicitAny: true`, and `strictNullChecks: true`.
   - Validate ALL external inputs, API request bodies, and query parameters with **Zod** schemas before execution.
3. **Frontend & Rendering Guidelines**:
   - Isolate interactive UI state to leaf components. Keep core pages lightweight and performant.
4. **Design System & Aesthetics**:
   - Keep every color, radius, shadow and font in a single token file (CSS variables) and consume tokens everywhere; never hardcode hex values in components.
   - Prefer crisp 1px borders and one subtle shadow scale over blurry default shadows. Pair one sans-serif for body/headings with one monospace for tags, badges, metrics, and code.
5. **Data Layer & Reliability**:
   - Write declarative schema definitions with foreign keys, composite indexes on queried filters, and automated timestamp triggers.
   - Use connection pooling and prepared statements for serverless database execution.
---
## 5. STEP-BY-STEP SCAFFOLDING ROADMAP
- **Phase 1: Workspace & Root Config**: Initialize package manager, monorepo configuration (`turbo.json`, `tsconfig.base.json`, `package.json`).
- **Phase 2: Database Schema & Client**: Set up the data layer (S3, RocksDB): client, connection pool, models, and migration scripts.
- **Phase 3: Design Tokens & UI Primitives**: Build accessible `Button`, `Input`, `Card`, `Badge`, and layout wrappers inside `packages/ui`.
- **Phase 4: Core Application Routes & Handlers**: Implement primary authentication, user session handling, and application routes.
- **Phase 5: Quality Assurance & Build Verification**: Run `tsc --noEmit`, ESLint, Prettier, and smoke test suites to ensure zero compilation or runtime errors.
---
## 6. EXECUTION INSTRUCTIONS
1. Review all specifications, architectural guardrails, and stack choices above.
2. Present the full monorepo directory tree structure.
3. Systematically generate the complete, production-ready codebase according to the 5-phase roadmap above — starting with the root workspace setup, followed by the database schema, UI design system package, and full-stack application routes until the repository is fully scaffolded and ready to run.
Scaffolded something with this prompt?
Would you pick this stack for a distributed blob & file storage project?

Copied 2 times · 1 of 1 reported launches succeeded (100%)

Frequently asked about SeaweedFS

What is SeaweedFS built with?

SeaweedFS is built primarily in Go, with high-performance storage kernels in Rust, Raft consensus for master coordination, and RocksDB/SQL for metadata storage.

How does SeaweedFS achieve O(1) disk lookups for billions of files?

SeaweedFS adopts Facebook Haystack design: metadata is separated from data. Files are appended into large 32GB volume files, and lookups require only an in-memory needle offset lookup and a single disk seek.

Is SeaweedFS compatible with Amazon S3?

Yes. SeaweedFS includes an embedded S3 API gateway supporting buckets, object versioning, presigned URLs, and multipart chunk uploads.

What is the difference between Master, Volume, and Filer nodes?

Masters manage volume allocation via Raft; Volume nodes store raw file chunks on local disks; Filers store directory structures and map file paths to volume needles.

Can SeaweedFS be deployed on Kubernetes with Helm?

Yes. The repository ships production Helm charts in k8s/charts that deploy SeaweedFS master and volume servers as Kubernetes workloads for scalable clusters.

One email a month: new deep dives and stack trends

New source-audited architectures, head-to-head comparisons and the monthly stack report. No spam, unsubscribe anytime.

use-this-stack.md