5577472124 seaweed-block: guard format finalize with serving-holder reports (#13448)
* test(block): expose serving-report and finalize grant races

* fix(block): guard format finalize with serving-holder reports

* test: pin finalize intent crash and refusal behavior

* fix: retain current process report checks across finalize

* fix: distinguish format placements from serving grants

* fix: preserve durability exit contract and strengthen finalize controls

* Normalize finalize manual ending after master merge

* fix(block): preserve capable refresh and report waits during finalize

* seaweed-block: pass the published line to the refresh owner check

The same-owner refresh check passed VolumeAuthorityLine's AuthorityBasis to
workspaceLineOwner, which takes a PublishedLine, so core/host/master did not
build. Resolve the owner through workspaceSourceHost, which reads the
published line for the same replica and epoch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: wait on a published line's owner, not every placed slot

A move does not rewrite the placement, so once a volume moved, its former
host's slot stayed in the grant waits. When that host's report for the volume
expired, the slot became a wait the new holder's reports never cleared, and
the status stayed degraded. The new holder, absent from the placement, got no
wait at all. A volume with a published line now waits on the line's owner
only; placed slots wait until a line exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: judge a heal or failover on the volume's own report

Only a same-owner endpoint refresh judged the volume's own process. A heal of
the current holder after a failed fence round, or a failover to a replica's
committed holder, places no new work on that server either, but it still read
the server's lowest level, so one old sibling process refused the recovery of
a capable holder. A reassign to the replica's committed holder now judges the
volume's own report like the refresh; a new placement keeps the server-wide
gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: red: a holder renews its lease before its first heartbeat is answered

Identity check (1) of the format finalize bound: until the master answers
a holder process's first heartbeat (which names its incarnation), it holds
only the predecessor's report for the volume, so a renewal in that window
is judged on the predecessor's proof. The lease runtime starts as soon as
the assignment epoch is known, independent of the heartbeat loop: with
the first heartbeat held open the holder renews anyway.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: a holder's first lease renewal waits for its first answered heartbeat

The heartbeat loop closes a signal when the master first answers this
process's heartbeat; the workspace lease runtime starts its guard (and so
its first renewal) only after it, so every renewal is judged on this
process's own report. A host whose heartbeat loop never started has
nothing to wait for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: a v1.0-shaped heartbeat supersedes the cached report, so its renewals are refused

Identity check (2) of the format finalize bound: a heartbeat with no
incarnation and no reads level, from a new process on the holder's
server, replaces the capable predecessor's report for the volume (as
level 0), so that process's renewals are refused at level 1 and during
the finalize intent; the capable process renews again after reporting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: the wait for the first answered heartbeat is bounded; past it the holder fences

Ruling: the first renewal waits for the first answered heartbeat at most
one lease validity (the longest validity a reply may carry); past that the
lease runtime installs its guard fenced, so a holder whose heartbeat is
never answered neither renews nor serves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: the v1.0-heartbeat check's intent case runs a real finalize

The intent case set only the master's finalizing flag; the renewal check
reads the publisher's own flag, which BeginFormatFinalize sets, so at
level 0 that case never reached the check. It now holds a real finalize
at its durable barrier, as the serving tests do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: docs: the operator procedure before the format finalize

The finalize section of the operations manual and the v1.1.2 notes state
the operator bound for the window before a new process's first answered
heartbeat: no v1.0.x volume process running or able to start until the
finalize completes, and a wait of at least 30 seconds after the last
volume process start. v1.1.3 carries the process identity on every
renewal and removes the procedure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: the first-heartbeat tests witness the window, test the bound and join the runtime

Review: the held-heartbeat test now waits until the first heartbeat is
inside the master's handler before checking that no renewal arrives, so
the window is witnessed open; the fence test checks that the lease
runtime waits its configured bound, no less, and names it in the fence
cause; both tests join the lease runtime within a bound at cleanup,
before the host and the server close.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: docs: the finalize operator text becomes a hard rule checked on each host

Ruling: a delayed heartbeat report can stand in for a newer process, so
the 30 s wait alone does not close the window. The manual and the v1.1.2
notes now state a hard rule, no v1.0.x volume process runs or starts from
the end of the upgrade until the finalize completes, checked on each host
from the running processes and the units rather than through blockmaster;
the wait stays as a backstop, and the remaining case is stated, not
claimed closed. v1.1.3 removes the rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: docs: the host check matches what --version prints; the guarantees name the latest report

Review: blockvolume --version prints 'revision=<commit> modified=<...>',
not a release number. The hard-rule check now compares every running
process's and every unit binary's line with the installed v1.1.x
binary's, and stops on another revision, modified=true or unknown, an
error or no output. The 30 s wait is described as usually catching a
missed process, not guaranteed to; the residual says a delayed report can
come from a stopped old process and grounds safety in which process can
still serve. The finalize ledger rows require the latest received report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: the fence test checks the bound from both sides; a failed join stops before teardown

Review: the never-answered test now measures from the lease runtime's own
wait start (a test hook) to its return and requires the bound, no less
and at most 500 ms more, so a runtime fencing at ten times the bound
fails it. The rig's cleanup join is fail-stop: a lease runtime that does
not return within 10 s stops the test binary before the host, the server
and the shared settings are torn down; a negative test covers the join.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: docs: the unit check covers every blockvolume unit; the notes drop the unconditional renewal claim

Review: the restart-binary check enumerates every blockvolume unit file
and template instance (sw-blockvolume*, loaded or not), since a
systemctl glob skips an enabled but stopped unit; and the v1.1.2 notes
now require the latest received report, say a v1.1.2 process renews
only after its own first answered heartbeat, and state the
delayed-report residual instead of claiming an old replacement can never
extend a lease.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: the rig's failed join exits without unwinding, proven in a child

Review: a panic in a cleanup still runs the later cleanups, so teardown
happened under a live worker. A failed join now ends the test binary
with os.Exit(3); a child test binary proves it: with a worker that never
returns it exits 3 and a later teardown cleanup never runs (its marker
is absent), with a returned worker it passes and the marker is present.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: docs: the unit check includes unloaded instances overridden by their own drop-ins

Review: list-unit-files finds unit files and templates, and list-units
finds instances in memory, so an unloaded instance whose ExecStart is
set only by its own drop-in directory was missed. The inventory now also
takes the enabled instance links and the instance drop-in directories;
systemctl cat on an instance shows the template with its drop-ins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: the fail-stop witness's child is bounded and joined

Review: the child test binary ran with no deadline, so a join that hangs
would hang the witness. It now runs under a 30 s context (killed and
reaped at the deadline, with -test.timeout=20s of its own), and a
timeout fails as a timeout, never as the expected exit 3. A join that
hangs instead of exiting fails the witness in about 23 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: docs: the ledger names the new regression tests; the manual's renewal guarantee names the latest report

Review: INV-FMT-FINALIZE-001 and INV-FMT-ELIGIBLE-001 name the sibling
refresh/reassign, placed and moved-owner wait, queued-finalize,
v1.0-heartbeat and first-heartbeat tests with their files; the FormatGate
r12 citation is marked as checked outside the repository; and the
manual's finalize section requires the latest received level-1 report,
says an old replacement is refused once its own report is received and
that the first-heartbeat wait does not identify the caller, and points
at the operator rule for a delayed report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: name the renewal validity cap the first-heartbeat wait is bound to

firstHeartbeatWait is documented as one lease validity, the longest a
renewal reply may carry, but repeated Refresh's 30 s literal. Both now use
maxRenewalValidity, so a change to the cap moves the bound with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: docs: the unit check searches every unit path for instance overrides

The instance search read only /etc/systemd/system and /run/systemd/system,
and only .wants links. A drop-in in another unit path (/usr/local/lib or
/usr/lib/systemd/system) applies to the instance the same way, and an
instance linked through .requires is enabled too, so an old ExecStart set
there passed the check. The search now walks systemd-analyze unit-paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: docs: the finalize ledger row names the files of its older finalize tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: docs: operator wording for the finalize release note, unit check and refusal hint

Review (wording only): the release note's Format finalize paragraphs are
rewritten for operators (what refuses, what to do, exit 74 and
format-level after a restart, the last-received report); the manual's
version lines must end with the reference line after the pid or path;
the unit check strips systemd's ExecStart= prefixes (-, @, +, !, :) so
an ignore-failure override is checked rather than refused; the finalize
bullet keeps only what an operator acts on; and the refusal hint says to
upgrade the named process and let it report, not to make it report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: docs: the release note's exit 74 covers only an uncertain replacement

Review: a write, sync, close or rename failure of the new file is an
ordinary error before the replacement (the level stays 0, no exit); only
a failure after the rename, when the new level may not be durable, exits
74.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: docs: the M4 lease guard shows the first-heartbeat gate; the unit check tolerates blanks around ExecStart=

Review: the M4 diagram and table now show that a renewal from NoLease
waits for this process's first answered heartbeat, and that NoLease
fences when none is answered within firstHeartbeatWait (one lease
validity), naming runWorkspaceLease and INV-FMT-FINALIZE-001. The
manual's unit check accepts blanks around '=' as systemd does, skips
only the empty reset, and prints a line that stops the check when a
value yields no binary; the version call no longer reads the loop's
input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: docs: the unit check covers copied volume units; listed names an idle old process

Review: the host check found units by the shipped name only, but the
shipped unit says to copy it for more volumes, so a stopped copy was
missed. The inventory now takes every unit, loaded or not and under any
name, whose file, drop-in or enabled link mentions blockvolume; only
ExecStart values that name blockvolume are checked, and one that runs it
through another program prints a stop line. The listed bullet now
includes a fresh level-0 report from a process that holds no volume.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: docs: the unit check runs every ExecStart value of every selected unit

Review: a unit with the current blockvolume base, an empty ExecStart=
reset and a renamed old binary in a drop-in printed only the base's good
line, because the check kept only values naming blockvolume. Every
non-empty ExecStart value of every selected unit, overridden or not, now
runs with --version and its line names the unit; a renamed binary, a
wrapper or a missing binary prints a non-reference line and stops the
check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: docs: the unit check never runs a program that is not blockvolume

Review: a wrapper, /bin/sh -c or a site script ignores --version and runs
as written. Only a binary named exactly blockvolume is now run; any
other ExecStart value prints 'NOT a blockvolume binary: confirm by hand'
without being executed, which is not the reference line, so the check
still stops on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: docs: the unit check reads every start directive; the operator confirms the rest

Review: ExecStartPre, ExecStartPost and ExecReload values are now checked
with the same rule as ExecStart. Units are found by the text blockvolume,
so a unit or script that starts a renamed binary without naming it
cannot be found by text search; step 2 now says the checks are helpers
and adds the rule line: confirm no other unit or script on the host
starts a v1.0.x volume binary. The listed bullet names a stale report at
any level, not only a capable one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: pingqiu <pingqiu@users.noreply.github.com>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-06 00:03:05 -08:00
2026-12-06 00:33:30 +00:00
2019-04-30 03:23:20 +00:00
2023-01-05 11:01:22 -08:00

SeaweedFS

Slack Twitter Build Status GoDoc Wiki Docker Pulls SeaweedFS on Maven Central Artifact Hub

SeaweedFS Logo

SeaweedFS is a simple and highly scalable distributed file system. There are two objectives:

  1. to store billions of files!
  2. to serve the files fast!

One SeaweedFS cluster serves an S3 object store, a POSIX file system, a lakehouse with S3 Tables and a built-in Iceberg REST Catalog, and vector search with S3 Vector Buckets, all on shared storage. Each blob is one disk read away, capacity grows by starting another volume server, and cloud storage can be cached or tiered transparently. Blob reads and writes have O(1) complexity and can run at the full speed supported by the underlying hardware.

SeaweedFS feature overview: S3 objects, POSIX files, table buckets with an Iceberg REST Catalog and Lance namespace, and S3 Vector Buckets share one cluster of masters, filers, and volume servers, with cloud caching, tiering, and cross-cluster replication.

Table of Contents

Quick Start

One command

Download the latest binary from the releases page and unzip the single weed (or weed.exe) file, or let the install script put it in /usr/local/bin:

curl -fsSL https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/install.sh | bash

For SeaweedFS Enterprise binaries, pass --enterprise to the script: ... | bash -s -- --enterprise.

Then start a ready-to-use S3 object store:

AWS_ACCESS_KEY_ID=admin \
AWS_SECRET_ACCESS_KEY=secret \
S3_BUCKET=my-bucket \
./weed mini -dir=./data

That's it. The S3 endpoint is at http://localhost:8333, my-bucket exists, and admin/secret are valid credentials:

AWS_ACCESS_KEY_ID=admin AWS_SECRET_ACCESS_KEY=secret \
  aws --endpoint-url http://localhost:8333 s3 cp README.md s3://my-bucket/

The same process also runs the master, a volume server, the filer, WebDAV, the Iceberg REST catalog, and the Admin UI. Add S3_TABLE_BUCKET=warehouse to also create an Iceberg table bucket, or warehouse:LANCE for a Lance one. Drop the AWS keys to run without authentication for development.

weed mini binds the Admin UI/API and WebDAV to -ip.bind like its other components, even without authentication, so use it on a trusted network or set WEED_ADMIN_PASSWORD or https.admin mTLS. Pass -admin.allowInsecureBind=false or -webdav.allowInsecureBind=false to keep an unauthenticated Admin or WebDAV on loopback. The Admin worker gRPC control plane stays on loopback; remote workers must opt in with -admin.worker.ip=<address> and should configure grpc.admin mTLS.

macOS: if the binary is quarantined, run xattr -d com.apple.quarantine ./weed first.

weed mini is auto-tuned for one node and is fine for single-node production, such as an S3 gateway that issues presigned URLs. See Quick Start with weed mini.

Docker

docker run -p 8333:8333 -v weed-data:/data \
  -e AWS_ACCESS_KEY_ID=admin \
  -e AWS_SECRET_ACCESS_KEY=secret \
  -e S3_BUCKET=my-bucket \
  chrislusf/seaweedfs

Same behavior as the weed mini command above.

Docker Compose

To run master, volume server, filer, S3, and WebDAV as separate services:

wget https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/docker/seaweedfs-compose.yml
wget -P prometheus https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/docker/prometheus/prometheus.yml
docker compose -f seaweedfs-compose.yml -p seaweedfs up

Docker Compose for S3 adds credentials, and the docker/compose folder has variants for replication, mounts, message queues, and more.

Kubernetes with Helm

helm repo add seaweedfs https://seaweedfs.github.io/seaweedfs/helm
helm install seaweedfs seaweedfs/seaweedfs -n seaweedfs --create-namespace -f values.yaml

A production-shaped values.yaml for a three-node cluster: two copies of every write, three masters, and an S3 endpoint with credentials and a bucket.

global:
  seaweedfs:
    enableReplication: true
    replicationPlacement: "001"   # one extra copy on another server; "002" for two

master:
  replicas: 3
  data:
    type: persistentVolumeClaim   # the cluster's default storage class; add storageClass to pick one
    size: 1Gi

volume:
  replicas: 3                     # at least 1 + the sum of the replication digits
  dataDirs:
    - name: data
      type: persistentVolumeClaim
      size: 500Gi
      maxVolumes: 0               # size the volume count from the disk

filer:
  replicas: 2
  data:
    type: persistentVolumeClaim
    size: 20Gi

s3:
  enabled: true
  replicas: 2
  enableAuth: true
  credentials:
    admin:
      accessKey: admin
      secretKey: change-me
  createBuckets:
    - name: app-storage

The S3 endpoint is the seaweedfs-s3 service on port 8333. Helm Chart Recipes has values for a development cluster, a lakehouse with the Iceberg catalog exposed, filer metadata on PostgreSQL, and node-local disks. The SeaweedFS Operator and the CSI driver are the other Kubernetes paths.

Build from source

git clone https://github.com/seaweedfs/seaweedfs.git
cd seaweedfs/weed && make install

weed lands in $GOPATH/bin. Getting Started covers running master, volume, filer, and S3 as separate processes.

Development builds

Each dev build workflow publishes its latest successful build of master:

  • Binaries: the dev release has Linux amd64, Windows amd64, and macOS amd64/arm64 archives named weed-<yyyymmdd-HHMM>-<linux|windows|darwin>-<arch>.tar.gz (.zip on Windows) and weed-large-disk-<yyyymmdd-HHMM>-<linux|windows|darwin>-<arch>, each with an .md5 checksum. The Rust volume server is published there too as weed-volume-* for Linux amd64 (glibc) and macOS amd64/arm64. The Go archives contain weed-normal-disk or weed-large-disk (.exe on Windows) rather than weed, and the Rust archives contain weed-volume-normal or weed-volume-large-disk rather than weed-volume, so rename or symlink the one you want. The .md5 files are published for the Go archives only.
  • Containers: docker pull chrislusf/seaweedfs:dev or ghcr.io/chrislusf/seaweedfs:dev, built for linux/amd64 and linux/arm64. The dev compose file runs the Docker Hub image as master, volume, filer, S3, WebDAV, and admin.

The timestamp in a binary name is the UTC start time of the run that built it. The Go binaries, the Rust volume server, and the :dev image come from three separate path-filtered workflows, so they can carry different timestamps and lag master by hours, or much longer when their paths were not touched. The release can list more than one timestamp for a while, for example after a failed or retried run; use the newest one for your platform. The dev release is marked pre-release, so it does not appear under releases/latest; these builds come from master, can break at any commit, and are not recommended for production.

Scale out

Capacity is a volume server. Start one on any machine with disk and point it at the master:

weed volume -dir=/data -master=<master_host>:9333

Nothing rebalances until you ask it to. Throughput is a filer or S3 gateway; they are stateless, so run as many as you need behind a load balancer. Production Setup walks through a multi-node cluster.

Back to TOC

Why SeaweedFS

Fast

  • One disk read per blob. A small file is one blob; a large file is split into chunks of a few MB, each its own blob. A volume server keeps a 16-byte index entry per blob in memory and reads it in a single seek, also for erasure-coded data.
  • The master is not in the read path. Clients cache the volume-to-server mapping and talk to volume servers directly.
  • 40 bytes of metadata per file on disk. Small files are packed into append-only volume files, so there is no per-file inode, no per-file metadata file, no fragmentation, and writes are SSD friendly.
  • Hot data is replicated; erasure coding is applied to warm data in the background, so writes never pay the encoding cost.
  • The Rust volume server is a drop-in for higher throughput and lower tail latency on the same on-disk format.

On one laptop, weed benchmark writes 1KB files at 15,700 per second and reads them back at 47,000 per second, and a mixed S3 warp run totals 3.2 GiB/s. Numbers are in the Benchmark section; throughput grows with volume servers and gateways.

Scalable

  • The master tracks volumes, not files. A cluster with billions of files has a few thousand volumes, so the master stays small. One master is enough for most clusters; run three for Raft failover.
  • Adding a server adds capacity with no data reshuffle. Balancing, vacuum, erasure coding, and repair run on demand from weed shell or the maintenance worker.
  • Filer and S3 gateways are stateless and scale linearly. Directory metadata lives in a store you already run: LevelDB, RocksDB, SQLite, MySQL, PostgreSQL, Cassandra, HBase, MongoDB, Redis, Elasticsearch, etcd, TiKV, FoundationDB, YDB, ArangoDB, Tarantool, and MySQL or PostgreSQL compatible databases such as TiDB, CockroachDB, and MemSQL.
  • Rack and data center aware replication, tiered storage across disk types, and transparent cloud tiering for unlimited capacity.
  • Files from a byte to tens of TB. Volumes up to 8TB with the large-disk build.

The most complete S3 API

The S3 gateway implements the object, bucket, S3 Tables, S3 Vectors, IAM, and STS APIs on one endpoint, so the AWS SDKs and CLI, rclone, restic, Spark, and Trino work unchanged. S3 Vectors uses the weed-vector service described below.

API Operations
S3 bucket and object 73
S3 Tables 36
S3 Vectors 19
IAM 39
STS 5

The full operation list is in Amazon S3 API, and Supported APIs vs MinIO compares. The S3 compatibility suite and the SDK, IAM, SSE, policy, and Spark integration tests run in CI on every change.

A data warehouse with S3 Tables

SeaweedFS is a lakehouse in one system. S3 Table Buckets hold Apache Iceberg tables by default, or Lance tables for vectors and multimodal data, and the built-in Iceberg REST Catalog and Lance namespace serve them directly. The S3 Tables API and Iceberg REST Catalog share the same namespaces, table metadata, and permissions. There is no Hive Metastore, Glue, or separate catalog service to deploy, secure, and back up.

  • Query engines operate on the same tables at the same time: Spark, Trino, Dremio, DuckDB, Apache Doris, RisingWave, ClickHouse, and LanceDB. Catalog commits are atomic compare-and-swap, so concurrent writers are safe. Lakekeeper can front the same storage with STS-vended credentials. OLake Go is a high-performance, open-source EL (Extract–Load) platform that bridges operational databases and open lakehouse storage - writing Apache Iceberg tables or Parquet files on Amazon S3.
  • Automated table maintenance: compaction, snapshot expiration, orphan file removal, and manifest rewriting, configured per bucket or table through the S3 Tables maintenance APIs, and the same for Lance.
  • IAM at the bucket, namespace, and table level with standard bucket policies, see S3 Tables Security.
  • A Hadoop compatible file system for Spark, Flink, and HBase.

S3_TABLE_BUCKET=warehouse ./weed mini -dir=./data brings the whole stack up on a laptop.

Vector search with S3 Vector Buckets

Keep embeddings alongside your objects and tables in the same SeaweedFS cluster. S3 Vector Buckets expose the AWS S3 Vectors API for semantic search, retrieval-augmented generation (RAG), and recommendations, using Lance tables on SeaweedFS storage.

  • Create vector buckets and indexes; insert, retrieve, list, and delete vectors with the AWS SDKs or CLI pointed at your S3 endpoint.
  • Find the nearest vectors with cosine or Euclidean distance, filter by metadata, and return distances and metadata with the results.
  • Control access with s3vectors:* IAM actions and vector bucket policies; tag buckets and indexes for organization and access control.

Install the separate vector engine; the default installer installs only weed:

curl -fsSL https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/install.sh | bash -s -- --component vector

Release 4.53 provides vector binaries for Linux amd64 and arm64. If your release has no binary for your platform, build from source. From a directory where you want a new checkout:

git clone https://github.com/seaweedfs/seaweedfs.git
cd seaweedfs
(cd seaweed-vector && cargo build --release -p weed-vector-server)

If you already have a checkout, start at its root and skip the clone and cd seaweedfs steps.

For Windows source builds, set PROTOC to a native protoc.exe before running Cargo; the desktop build workflow shows how to select the vendored executable.

Run the installed weed-vector binary alongside the local cluster started with weed mini above (or use seaweed-vector/target/release/weed-vector after building from source):

weed-vector --masters=localhost:9333

It registers with the master and the S3 gateway discovers it automatically. An AWS S3 Vectors client uses the same S3 endpoint at http://localhost:8333. The vector engine stores its data through the cluster's filers and volume servers, so embeddings share the storage layer's replication and erasure coding. See the AWS SDK examples for bucket, index, and query operations.

A fast cache for cloud storage

Cloud Drive mounts a bucket from S3, Google Cloud Storage, Azure, Backblaze B2, Wasabi, Storj, or any S3-compatible store into SeaweedFS and serves it at local speed:

  • Metadata is pulled once, so listing, stat, and directory walks cost no cloud API calls.
  • File content is downloaded once, on first read or warmed by folder, name pattern, size, or age, and cached with the capacity of the whole cluster: cache everything, no churn.
  • Local writes complete at local latency and are written back to the cloud asynchronously in the cloud's native layout, so other tools keep reading the bucket directly.
  • Uncache by the same rules to free local disk while keeping the metadata.

Cloud Tier goes the other direction, moving whole warm volumes to cloud storage while keeping one-read access, and the Gateway to Remote Object Storage mirrors every bucket to a remote store. Faster and cheaper than reading the cloud directly.

Active-active replication and more

Back to TOC

Architecture

SeaweedFS Architecture

  • Master servers, one or a Raft group of three, track which volume lives on which volume server and hand out file ids. They are not in the read path.
  • Volume servers store blobs in append-only volume files, keep a 16-byte in-memory index per blob, and replicate or erasure-code at the volume level.
  • Filer servers add directories and files on top, with metadata in a store of your choice, and expose HTTP, S3, WebDAV, SFTP, FUSE, and the table catalogs.

The blob store started from Facebook's Haystack, erasure coding takes ideas from f4, and the whole has a lot in common with Tectonic and Colossus. How file ids are assigned, written, and looked up, and why a master that tracks volumes scales, is in Blob Store Architecture; the services are in Components and the white paper.

Back to TOC

Compared to Other Systems

Most other distributed file systems seem more complicated than necessary.

SeaweedFS is meant to be fast and simple, in both setup and operation. If you do not understand how it works when you reach here, we've failed! Please raise an issue with any questions or update this file with clarifications.

SeaweedFS is constantly moving forward. Same with other systems. These comparisons can be outdated quickly. Please help to keep them updated.

Compared to HDFS

HDFS uses the chunk approach for each file, and is ideal for storing large files.

SeaweedFS is ideal for serving relatively smaller files quickly and concurrently.

SeaweedFS can also store extra large files by splitting them into manageable data chunks, and store the file ids of the data chunks into a meta chunk. This is managed by "weed upload/download" tool, and the weed master or volume servers are agnostic about it.

Compared to GlusterFS, Ceph

The architectures are mostly the same. SeaweedFS aims to store and read files fast, with a simple and flat architecture. The main differences are

  • SeaweedFS optimizes for small files, ensuring O(1) disk seek operation, and can also handle large files.
  • SeaweedFS statically assigns a volume id for a file. Locating file content becomes just a lookup of the volume id, which can be easily cached.
  • SeaweedFS Filer metadata store can be any well-known and proven data store, e.g., Redis, Cassandra, HBase, Mongodb, Elastic Search, MySql, Postgres, Sqlite, MemSql, TiDB, CockroachDB, Etcd, YDB etc, and is easy to customize.
  • SeaweedFS Volume server also communicates directly with clients via HTTP, supporting range queries, direct uploads, etc.
System File Metadata File Content Read POSIX REST API Optimized for large number of small files
SeaweedFS lookup volume id, cacheable O(1) disk seek Yes Yes
SeaweedFS Filer Linearly Scalable, Customizable O(1) disk seek FUSE Yes Yes
GlusterFS hashing FUSE, NFS
Ceph hashing + rules FUSE Yes
MooseFS in memory FUSE No
MinIO separate meta file per drive for each file Yes No
RustFS separate meta file per drive for each file Yes No

GlusterFS stores files, both directories and content, in configurable volumes called "bricks". It hashes the path and filename into ids, and assigned to virtual volumes, and then mapped to "bricks".

Compared to MooseFS

MooseFS chooses to neglect small file issue. From moosefs 3.0 manual, "even a small file will occupy 64KiB plus additionally 4KiB of checksums and 1KiB for the header", because it "was initially designed for keeping large amounts (like several thousands) of very big files"

MooseFS Master Server keeps all meta data in memory. Same issue as HDFS namenode.

Compared to Ceph

Ceph can be setup similar to SeaweedFS as a key->blob store. It is much more complicated, with the need to support layers on top of it. Here is a more detailed comparison

SeaweedFS has a centralized master group to look up free volumes, while Ceph uses hashing and metadata servers to locate its objects. Having a centralized master makes it easy to code and manage.

Ceph, like SeaweedFS, is based on the object store RADOS. Ceph is rather complicated with mixed reviews.

Ceph uses CRUSH hashing to automatically manage data placement, which is efficient to locate the data. But the data has to be placed according to the CRUSH algorithm. Any wrong configuration would cause data loss. Topology changes, such as adding new servers to increase capacity, will cause data migration with high IO cost to fit the CRUSH algorithm. SeaweedFS places data by assigning them to any writable volumes. If writes to one volume failed, just pick another volume to write. Adding more volumes is also as simple as it can be.

SeaweedFS is optimized for small files. Small files are stored as one continuous block of content, with at most 8 unused bytes between files. Small file access is O(1) disk read.

SeaweedFS Filer uses off-the-shelf stores, such as MySql, Postgres, Sqlite, Mongodb, Redis, Elastic Search, Cassandra, HBase, MemSql, TiDB, CockroachCB, Etcd, YDB, to manage file directories. These stores are proven, scalable, and easier to manage.

SeaweedFS comparable to Ceph advantage
Master MDS simpler
Volume OSD optimized for small files
Filer Ceph FS linearly scalable, Customizable, O(1) or O(logN)

Compared to MinIO, RustFS

Please note, as Apr 25, 2026 MinIO ceased development. It's strongly discouraged to use that unmaintained software with multiple security bugs. RustFS is a MinIO reimplementation in Rust, Apache 2.0 licensed and still developed, keeping MinIO's storage model down to a byte-compatible on-disk format. So the points below apply to both.

MinIO followed AWS S3 closely and was ideal for testing for S3 API. It had good UI, policies, versionings, etc. SeaweedFS is trying to catch up here.

The metadata are in simple files. Each file write incurs extra writes to the corresponding meta file, on every drive of the erasure set. Changing only tags or retention rewrites that meta file on all of them, so the write amplification does not shrink with object size.

There is no optimization for lots of small files. The files are simply stored as is to local disks. Plus the extra meta file and shards for erasure coding, it only amplifies the LOSF problem.

Multiple disk IO are needed to read one file. SeaweedFS has O(1) disk reads, even for erasure coded files.

Erasure coding is full-time. SeaweedFS uses replication on hot data for faster speed and optionally applies erasure coding on warm data.

No POSIX-like API support.

There are specific requirements on storage layout, which makes it hard to scale out and to maintain. An erasure set must be 2 to 16 drives and must divide the drive list symmetrically, and capacity grows or shrinks a whole pool at a time. In SeaweedFS, just start one volume server pointing to the master. That's all.

Back to TOC

Benchmark

Unscientific single-machine numbers from a MacBook with an SSD. weed benchmark, 1 million 1KB files, concurrency 16:

Requests per second p50 p99
Write 15,708 0.8 ms 2.6 ms
Random read 47,019 0.3 ms 0.7 ms

make benchmark runs warp mixed S3 traffic against a local weed server:

Mixed operations.
Operation: DELETE, 10%, Concurrency: 20, Ran 42s.
 * Throughput: 55.13 obj/s

Operation: GET, 45%, Concurrency: 20, Ran 42s.
 * Throughput: 2477.45 MiB/s, 247.75 obj/s

Operation: PUT, 15%, Concurrency: 20, Ran 42s.
 * Throughput: 825.85 MiB/s, 82.59 obj/s

Operation: STAT, 30%, Concurrency: 20, Ran 42s.
 * Throughput: 165.27 obj/s

Cluster Total: 3302.88 MiB/s, 550.51 obj/s over 43s.

Read throughput is bounded by the random read speed of the disks, and grows with every volume server added. More numbers, including multi-node, FUSE, and Hadoop, are in Benchmarks, S3 API Benchmark, FIO benchmark, and Independent Benchmarks.

Back to TOC

Enterprise

For enterprise users, please visit seaweedfs.com for the SeaweedFS Enterprise Edition, which has advanced features, including data recovery, self-healing storage, customizable erasure coding, EC vacuum and repair, etc.

Back to TOC

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Back to TOC

Sponsors

Sponsor SeaweedFS via Patreon

SeaweedFS is an independent Apache-licensed open source project with its ongoing development made possible entirely thanks to the support of these awesome backers. If you'd like to grow SeaweedFS even stronger, please consider joining our sponsors on Patreon.

Your support will be really appreciated by me and other supporters!

Gold Sponsors

nodion piknik keepsec zyner

Back to TOC

Star History

Star History

Languages
Go 84.8%
Rust 7.6%
Shell 2.7%
templ 1.5%
Java 0.9%
Other 2.3%