Can you host replicated clusters/nodes in different locations? #1214
Replies: 1 comment
-
|
If you have a fast enough network between them, you can run a normal distributed hiqlite cluster. I would not recommend that over a slow Internet connection though. You can test it, but you will probably have noticeable delays for all write actions, because the Raft is not only sync, but it also needs 2 network round trips for each commit, which is by design. With Postgres, you can set up async replication, but the 2nd instance will of course be read only. Any other multi-master DB, like you might want to set it up with Cockroach or something like that, will most probably have the same limitations as Hiqlite. If you have a slow network between nodes, I would not recommend this at all. For such a case, you would need to have a disaster recovery strategy and then do a manual switch and either restore from backup, or you might want to create a setup with a non-voting 4th hiqlite replica. This node would only be a Learner, not a Voter, and therefore not have a negative impact on write operations, even if it's far away. However, I never documentated such a setup, because there was never a need for this. Rauthy does not support any form of async replication where one of the nodes can be offline for a longer period of time (apart from having a degraded Raft cluster inside a fast network, which is no issue apart from error log spam), and I am not aware of any solution based on Postgres, if you want to be able to have a multi master. Btw you can run a Hiqlite cluster with 2 nodes, but this is the worst possible idea. Raft, by design, needs to have an odd number of nodes for a fault-tolerant setup. Edit: Btw, for any serious setup, having a single WAN connection is a very bad idea. You always want to have a 2nd one with automatic failover. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
With the current implementation of high availability, can Hiqlite or Postgres support two nodes at two separate locations? For my use case, it would be two instances replicated at two different houses - so that in the event one lost a WAN connection, services could still authenticate locally. I have never orchestrated/created this kind of setup from scratch, with the exception of Adguard and KanIDM which both have well-documented solutions that basically guide you through the whole way.
Beta Was this translation helpful? Give feedback.
All reactions