Comparing Storage Options

The Filer Store persists all file metadata and directory information.

Filer Store NameLookupnumber of entries in a folderScalabilityRenamingTTLNote
memoryO(1)limited by memoryLocal, Fastfor testing only, no persistent storage
leveldbO(logN)unlimitedLocal, Very FastDefault, fairly scalable
leveldb2O(logN)unlimitedLocal, Very Fast, faster than leveldbSimilar to leveldb, part of the lookup key is 128bit MD5 instead of the long full file path
RedisO(1)limitedLocal or Distributed, FastestYesone directory's sub file names are stored in one key~value entry
CassandraO(logN)unlimitedLocal or Distributed, Very FastYes
MySqlO(logN)unlimitedLocal or Distributed, FastAtomicEasy to manage
PostgresO(logN)unlimitedLocal or Distributed, FastAtomicEasy to manage
MemSqlO(logN)unlimitedDistributed, FastAtomicScalable
TiDBO(logN)unlimitedDistributed, FastAtomicScalable
CockroachDBO(logN)unlimitedDistributed, FastAtomicScalable
EtcdO(logN)~10GBDistributed, 10,000 writes/secNo SPOF. High Availability.
TiKVO(logN)unlimitedLocal or Distributed, FastAtomicEasy to manage

Switching between different Stores

It is easy to switch between different filer stores.

For example:

  1. # first save current filer meta data
  2.  
  3. $ weed shell
  4. > fs.cd http://filerHost:filerPort/
  5. > fs.meta.save
  6. ...
  7. total 65 directories, 292 files
  8. meta data for http://localhost:8888/ is saved to localhost-8888-20190417-005421.meta
  9. > exit
  10.  
  11. # now switch to a new filer, and load the previously saved metadata
  12. $ weed shell
  13. > fs.meta.load localhost-8888-20190417-005421.meta
  14. ...
  15. total 65 directories, 292 files
  16. localhost-8888-20190417-005421.meta is loaded to http://localhost:8888/

Extending Storage Options

For any new storage option, please implement the FilerStore interface. It should be fairly straight forward to implement. Welcome to contribute back.