Reputation: 3669
After connecting to a 3-node event store cluster, then, for whatever reason, one of the 3 nodes is down (could be any one of the 3), what happens if the clients tries to append some data to the cluster now?
Does it write the data to the two remaining nodes?
Is the behaviour deterministic or it depends on which node (master or slave) is down?
Upvotes: 2
Views: 378
Reputation: 19630
Event Store clustering relies on the gossip seed to select one master from all available nodes. As soon as the master node is down, the cluster will elect a new master. All the writes always, unconditionally, are directed to the master node.
You must ensure that you use the proper connection string to connect to the cluster, not to a single node, like:
Multi-node DNS name:
var connectionString = "ConnectTo=discover://admin:changeit@mycluster:3114; HeartBeatTimeout=500
Individual cluster nodes list:
var connectionString = "GossipSeeds=192.168.0.2:1111,192.168.0.3:1111; HeartBeatTimeout=500"
You can only force the connection to use slave nodes when using it for subscriptions.
Upvotes: 1