SeaweedFS is a Haystack-style blob store designed for the workload that breaks traditional POSIX filesystems — billions of small files (thumbnails, log fragments, sensor readings) where the per-inode overhead dwarfs the actual data. It packs many objects into large volume files on disk, addresses them by a compact file ID, and replicates volumes across hosts. The S3 gateway and POSIX filer layer it on for application compatibility, but the wire-level primitive is GET /fid/12,01637037d6 returning bytes. This article documents the three-role install (master, volume, filer), how the data plane actually works, and where SeaweedFS fits versus MinIO or Ceph RGW for typical small-file workloads.
How to verify
# Master node
curl -s http://localhost:9333/cluster/status | jq .
curl -s http://localhost:9333/dir/status | jq .
# Volume node
curl -s http://localhost:8080/status | jq .
# Filer node
curl -s http://localhost:8888/ -X GET
# Or list a directory
curl -s "http://localhost:8888/?pretty=y"
# S3 gateway (if enabled)
curl -i http://localhost:8333/
What’s happening
SeaweedFS has three daemons. Master maintains the volume map — which volume IDs live on which volume servers, replica placement, free space — and assigns new uploads to a volume with capacity. Volume servers actually store data; each volume server owns one or more volume files (large append-mostly files on disk, typically 30 GB each) and indexes objects by needle. Filer is an optional layer that adds POSIX-like directory structure on top, storing the path → file ID mapping in an external database (LevelDB, MySQL, PostgreSQL, Redis). The S3 gateway is a separate daemon (s3) that sits in front of the filer.
The write path: a client asks the master for an assignment (POST /dir/assign), gets back {fid: "3,01637037d6", url: "volume1:8080"}, then PUTs the bytes to that volume URL. The volume server appends to the active volume file, indexes the offset in a separate index file, and returns success. Reads use just the file ID — no master lookup needed for the actual read, because the file ID encodes the volume ID and the volume map is cached by clients.
Replication is volume-level, set at volume creation time. replication=001 means “1 replica in a different rack.” replication=010 is “1 replica in a different data center.” replication=200 is “2 replicas in different data centers, 0 elsewhere.” This gives you control over failure domains but is set at volume create and can’t be changed in-place — to change replication, you create a new volume with the new policy and migrate.
Where SeaweedFS shines: small file workloads (sub-MB) at high object counts (hundreds of millions to billions), where the constant overhead per object dominates total storage cost. Where it doesn’t: large files, where MinIO’s straightforward streaming and erasure coding give better economics, or workloads needing strong consistency and rich S3 features (versioning, object lock) where MinIO or Ceph RGW are more mature.
The procedure
-
On three nodes (
weed1,weed2,weed3), download the binary:wget https://github.com/seaweedfs/seaweedfs/releases/latest/download/linux_amd64_full.tar.gz tar -xzf linux_amd64_full.tar.gz sudo install -m 0755 weed /usr/local/bin/ sudo useradd -r seaweed -s /sbin/nologin sudo mkdir -p /var/lib/seaweed/{master,volume,filer} sudo chown -R seaweed:seaweed /var/lib/seaweed -
On all three nodes, start the master daemon (each peers with the others):
# /etc/systemd/system/weed-master.service [Unit] Description=SeaweedFS Master After=network-online.target [Service] User=seaweed ExecStart=/usr/local/bin/weed master \ -mdir=/var/lib/seaweed/master \ -port=9333 \ -peers=weed1:9333,weed2:9333,weed3:9333 \ -defaultReplication=001 Restart=always [Install] WantedBy=multi-user.targetsudo systemctl enable --now weed-master -
On the same three nodes, start a volume server each:
# /etc/systemd/system/weed-volume.service [Unit] Description=SeaweedFS Volume After=network-online.target weed-master.service [Service] User=seaweed ExecStart=/usr/local/bin/weed volume \ -dir=/var/lib/seaweed/volume \ -port=8080 \ -mserver=weed1:9333,weed2:9333,weed3:9333 \ -max=100 Restart=always [Install] WantedBy=multi-user.target -
On one node, start the filer (for POSIX semantics):
# /etc/systemd/system/weed-filer.service [Service] User=seaweed ExecStart=/usr/local/bin/weed filer \ -master=weed1:9333,weed2:9333,weed3:9333 \ -port=8888 \ -ip.bind=0.0.0.0 -
Test direct fid-style upload:
# Get an assignment curl -X POST "http://weed1:9333/dir/assign" | jq . # Returns: {"fid":"3,01637037d6","url":"weed1:8080","publicUrl":"weed1:8080","count":1} curl -F "file=@/etc/hostname" "http://weed1:8080/3,01637037d6" curl "http://weed1:8080/3,01637037d6" -o /tmp/check.txt cat /tmp/check.txt -
Test filer (S3-like directory semantics):
curl -F "file=@/etc/hostname" "http://weed1:8888/uploads/hostname.txt" curl "http://weed1:8888/uploads/?pretty=y" -
Enable the S3 gateway for app integration:
sudo /usr/local/bin/weed s3 -filer=weed1:8888 -port=8333 & aws --endpoint-url http://weed1:8333 s3 mb s3://uploads aws --endpoint-url http://weed1:8333 s3 cp /etc/hostname s3://uploads/
Common pitfalls
- The default replication is
000(no replicas). Always set-defaultReplicationon the master at boot, or volumes get created with no redundancy and data loss is permanent. - The volume
-maxflag is the maximum number of volume files this volume server will hold; if reached, new uploads go elsewhere. Plan it against disk capacity (30 GB × max = disk needed). - Filer DB choice matters at scale — LevelDB is fine for a few million entries; PostgreSQL or Redis cluster is needed beyond. Switching later requires a migration.
- The S3 gateway is feature-incomplete versus MinIO or RGW; check your application’s specific S3 calls before committing.
- Master quorum is Raft-based but the SeaweedFS Raft implementation has had bugs across versions; pin to a known-good release tag rather than
latest.
In the engagements we run, SeaweedFS is the choice when the customer’s workload is explicitly billions of small objects — image thumbnails for an e-commerce site, IoT sensor readings, audit log fragments — and other object stores fall over on metadata overhead. We deploy with replication=001 across three nodes, monitor master quorum state and per-volume utilization, and back the filer with PostgreSQL when entry counts go past 100M. For more typical workloads, MinIO or Ceph RGW is usually the better fit.