In typesense when adding multiple nodes do they need to be in a vpn? like amazon vpc? or an actual vpn setup?
also does typesense client do any latency tests to choose the best node?
k
Kishore Nallan
06/02/2021, 2:08 PM
Our JS client supports a nearest node configuration in addition to accepting all nodes in a cluster. Client will try to hit nearest node host name first. You have to use your dns providers latency based routing.
As for the first question, they have to be in public subnet to be available to JS clients but the raft based replication has to happen on internal IPs on an internal network. You should not use public IPs for raft communication.
r
Ricardo
06/02/2021, 3:36 PM
yeah seems like cloudflare would work but route53 actually looks cheaper.
also I think I might be able to do without consensus for now and just update 2 instances, I run the risk of losing some stuff but should be fine.
j
Jason Bosco
06/02/2021, 6:53 PM
In a two node setup, if one of the nodes go down, the other node will also stop accepting reads & writes to prevent a split-brain, unless you update the nodes file to remove the 2nd node by hand.
r
Ricardo
06/03/2021, 1:54 AM
@Jason Bosco I mean just not having a cluster, but keeping two independent nodes updated.
j
Jason Bosco
06/03/2021, 1:57 AM
I see, if it's only to keep data in sync between two nodes then that would work. Just wanted to point out that a 2-node setup will not give you high availability.