diff --git a/Filer-Store-Replication.md b/Filer-Store-Replication.md new file mode 100644 index 0000000..86e10e7 --- /dev/null +++ b/Filer-Store-Replication.md @@ -0,0 +1,27 @@ +# Goal + +* Synchronize the meta data in the filer stores. +* Active-Active or one-directional replication. + +# Use Cases + +For filer stores using shared filer stores, such as shared Mysql/Postgres/Cassandra/Redis/etc in [[Filer-Stores]], this is not really needed, since all filers are stateless. + +But if each filer has its own filer store, usually with the default local leveldb, or even with a dedicated Mysql/Postgres/Cassandra/Redis/etc store, this would be very useful. + +# One-Directional Replication + +When starting a filer, set the `-peers` option, to receive updates from the peers. + +Assuming there is a separate filer.toml for each filer, and a filer is already running at `localhost:8888`, this command will replicate metadata in `localhost:8888` to `localhost:8889`. + +``` +weed filer -port=8889 -peers=localhost:8888 +``` + +# Active-Active Replication + +``` +weed filer -port=8888 -peers=localhost:8888,localhost:8889 +weed filer -port=8889 -peers=localhost:8888,localhost:8889 +```