在KRaft模式里,只有一小部分的服务器作为Controller运行(相比之下,Zookeeper模式里,任何服务器都可以成为Controller)。
这一小部分指定的服务器会参与到元数据的选举中。每一个Controller服务器要么是acitve状态,要么是当前active状态服务器的热备份(hot standby)。
In KRaft mode, only a small group of specially selected servers can act as controllers (unlike the ZooKeeper-based mode, where any server can become the
Controller). The specially selected controller servers will participate in the metadata quorum. Each controller server is either active, or a hot
standby for the current active controller server.You will typically select 3 or 5 servers for this role, depending on factors like cost and the number of concurrent failures your system should withstand
without availability impact. Just like with ZooKeeper, you must keep a majority of the controllers alive in order to maintain availability. So if you have 3
controllers, you can tolerate 1 failure; with 5 controllers, you can tolerate 2 failures.