First, run to see an example filer.toml file. Copy it out and read it, create the data store if needed.

The simplest filer.toml can be:

Two ways to start a weed filer

Now you can add/delete files, and even browse the sub directories and files

Filer has a persistent client connecting to Master, to get the location updates of all volumes.There are no network round trip to lookup the volume id location.

  • Filer read from volume servers and pass along to the read request.For file writes:

  • Client stream files to Filer

  • Filer uploads data to Weed Volume Servers, and break the large files into chunks.

Complexity

For one file retrieval, the (file_parent_directory, fileName)=>meta data lookup will be O(logN) for LSM tree or Btree implementations, where N is number of existing entries, or O(1) for Redis.

For file listing under a particular directory, the listing is just a simple scan for LSM tree or Btree, or O(1) for Redis.

For adding one file, the parent directories will be recursively created if not exists. And then the file entry will be created.

For directory renaming, it will be O(N) operations, with N as the number of files and folders underneath the to-be-renamed directory. This is because each of them will need to adjust the metadata. But still there are no change for the actual file content on volume servers.

Clients can assess one "weed filer" via HTTP, list files under a directory, create files via HTTP POST, read files via HTTP POST directly.

Although one "weed filer" can only sits in one machine, you can start multiple "weed filer" on several machines, each "weed filer" instance running in its own collection, having its own namespace, but sharing the same SeaweedFS storage.

Filer is designed to be linearly scalable, and only limited by the underlying meta data storage.

Filer has two use cases.

When filer is used with "weed mount", the filer only provides file meta data retrieval. The actual file content are read and write directly between "weed mount" and "weed volume" servers. So the filer is not that much loaded.