-1

I am following this site to learn raft: http://thesecretlivesofdata.com/raft/

Questions:

  1. If there are 9 nodes and network partitions lead to 3 subsets each with 3 nodes: {0, 1, 2}, {3, 4, 5}, and {6, 7, 8}, there is no majority in any subset? In such a case, there is no leader node, right? Then, what happens if a client sends a write? Just fail?

  2. There are 9 nodes. Which node will a client talk to? In some service routing algorithm, a tier is defined, so the client talks to the tier instead of a node. Then, routing algorithm returns a node with load balanced. Wonder in the context of raft, how does client select a node to talk to?

SuperBald
  • 109
  • 1
  • 12

1 Answers1

1
  1. yes, no leader will be elected in any partition. Client requests will be declined (semantics depend on implementation).
  2. There are many options. Typically, every node knows who is supposed to be a leader. So a client may connect to any node, and if the node is not the leader, the node will reply with leader's address. It may or may not be a routing layer between a cluster and a client - but even the routing layer needs to discover the leader - easiest way to ask any node and cache the reply; and use it till the leader crashes.
AndrewR
  • 1,252
  • 8
  • 7