More specifically, let us say that I trip on a network cable and split a ReDiS cluster's masters from that cluster's ReDiS slaves. If the number of masters doubles, can I just make my client only write to the "first" masters from before the split?
For example, if I have a cluster with the following properties, and I trip on the network cable between subnet 192.168.53.* and 192.168.105.* do I wind up with 6 masters?
ReDiS 1 on 192.168.53.1:7000 (master)
ReDiS 2 on 192.168.53.1:7001 (master)
ReDiS 3 on 192.168.53.1:7002 (master)
ReDiS 4 on 192.168.105.2:7000 (slave)
ReDiS 5 on 192.168.105.2:7001 (slave)
ReDiS 6 on 192.168.105.2:7002 (slave)
I'm guessing that ReDiS 4, ReDiS 5, and ReDiS 6 would quickly make themselves masters, and that I'd end up with the following:
ReDiS 1 on 192.168.53.1:7000 (master)
ReDiS 2 on 192.168.53.1:7001 (master)
ReDiS 3 on 192.168.53.1:7002 (master)
=======//Snapped Cable//========
ReDiS 4 on 192.168.105.2:7000 (master)
ReDiS 5 on 192.168.105.2:7001 (master)
ReDiS 6 on 192.168.105.2:7002 (master)
Also, when I replace the snapped cable, I'd end up with the following again, right?
ReDiS 1 on 192.168.53.1:7000 (master)
ReDiS 2 on 192.168.53.1:7001 (master)
ReDiS 3 on 192.168.53.1:7002 (master)
ReDiS 4 on 192.168.105.2:7000 (slave)
ReDiS 5 on 192.168.105.2:7001 (slave)
ReDiS 6 on 192.168.105.2:7002 (slave)
Is it wise if I write my clients to be aware of what the masters "should" be, and have them only write to the masters in 192.168.53.*?
An example for mitigating problems from this scenario, could I make the following variable only update when one of the ReDiS represented by members of firstThreeMasters
becomes a slave?
firstThreeMasters = [ "192.168.53.1:7000", "192.168.53.1:7001", "192.168.53.1:7002" ]
(Although my client code's behavior is the subject of this question, do you think this belongs in serverfault.com? Please advise in comments or recommend to move it, if so.)