Created Filer Store Replication (markdown)

Chris Lu 2020-09-06 10:29:36 -07:00
parent 56a49d50ab
commit b6096f3a36

@ -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
```