Running Wildduck instances on multiple servers.
See original GitHub issueHi *,
I want to run two Wildduck instances on two different physical servers. The first one should be the main mail server and the second one should serve as a backup mail server, accepting mail in case the first mail server is down. Hence I want both servers to have identical data.
Does anyone know how to do this, especially regarding mongodb
and redis
? @andris9 do you have any suggestions on this one?
Any information is appreciated.
What I already looked into
All mails are stored in the mongodb
database, therefor the database has to be synchronized between both servers. I’ve figured out, that mongodb
has a feature called replication set that does exactly what I need.
I do not know what the corresponding concept is called for redis
though or if I need to replicate the information in redis
at all (haven’t looked into the code yet).
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (8 by maintainers)
With 2 servers you could run Redis in a “normal” 1 master - 1 slave configuration without Sentinel and also 2 node MongoDB replica set (with or without arbiter). If one of these servers goes down then:
REPLICAOF NO ONE
command in the former slave instance). Also modify WildDuck config files to use the new server as Redis host.rs.remove()
command. Once you have a replica set with a single server then you have enough votes and the instance could become primary again.Thank you all. I think @andris9 did explain the possible solutions to this issue very thoroughly. I for myself will use a three server setup to have automatic failover.