You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by 一直以来 <27...@qq.com.INVALID> on 2021/09/02 00:32:12 UTC

回复: why zookeeper server count is odd !!!

thank you Shawn,


second email i want know :


if i have 7 zookeeper server,


if internet error, <123&gt;server in one small master-replica, <4567&gt; server in one small master-replica too,
so i want know :
<123&gt;server&nbsp; can have new leader??
and&nbsp;
<4567&gt;server&nbsp; can have new leader??


thank you !




------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "user"                                                                                    <apache@elyograg.org&gt;;
发送时间:&nbsp;2021年9月1日(星期三) 晚上10:15
收件人:&nbsp;"user"<user@zookeeper.apache.org&gt;;

主题:&nbsp;Re: why zookeeper server count is odd !!!



On 8/31/2021 7:59 PM, 一直以来 wrote:
&gt; can has a url address ?? or&amp;nbsp; at zookeeper.apache.org&amp;nbsp; site doc ??


An odd number of servers is recommended because you don't gain anything 
from having one more (making it an even number).

https://zookeeper.apache.org/doc/r3.6.1/zookeeperAdmin.html#sc_CrossMachineRequirements

Relevant info on that page:

---
For the ZooKeeper service to be active, there must be a majority of 
non-failing machines that can communicate with each other. To create a 
deployment that can tolerate the failure of F machines, you should count 
on deploying 2xF+1 machines. Thus, a deployment that consists of three 
machines can handle one failure, and a deployment of five machines can 
handle two failures. Note that a deployment of six machines can only 
handle two failures since three machines is not a majority. For this 
reason, ZooKeeper deployments are usually made up of an odd number of 
machines.
---

I could not figure out what your second email was asking. Subject:
has 7 zookeeper server , internet wrong,<123&gt;,<4567&gt;

Thanks,
Shawn

回复: 回复: why zookeeper server count is odd !!!

Posted by 一直以来 <27...@qq.com.INVALID>.
ho ho ho !&nbsp; you guess rigth ,


sure "In Split-Brain, the total is based on 7."


i understand i know&nbsp; !


thank you !




------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "user"                                                                                    <apache@elyograg.org&gt;;
发送时间:&nbsp;2021年9月2日(星期四) 上午10:32
收件人:&nbsp;"user"<user@zookeeper.apache.org&gt;;

主题:&nbsp;Re: 回复: why zookeeper server count is odd !!!



On 9/1/2021 6:32 PM, 一直以来 wrote:
&gt; second email i want know :
&gt; 
&gt; if i have 7 zookeeper server,
&gt; 
&gt; if internet error, <123&gt;server in one small master-replica, <4567&gt; server in one small master-replica too,
&gt; so i want know :
&gt; <123&gt;server can have new leader??
&gt; and 
&gt; <4567&gt;server can have new leader??

I still do not understand what you're asking, but I will try to guess.

An ensemble with 7 servers can survive 3 failures.

If you are describing a situation with 7 servers where the 1, 2, and 3 
servers are disconnected from the rest but can still communicate with 
each other, those 3 servers will NOT be able to achieve quorum.&nbsp; If the 
other 4 servers can talk to each other, then they WILL achieve quorum 
and elect a leader.&nbsp; This is how ZK is designed, and I really doubt that 
it will ever change.

Thanks,
Shawn

Re: 回复: why zookeeper server count is odd !!!

Posted by Shawn Heisey <ap...@elyograg.org>.
On 9/1/2021 6:32 PM, 一直以来 wrote:
> second email i want know :
> 
> if i have 7 zookeeper server,
> 
> if internet error, <123>server in one small master-replica, <4567> server in one small master-replica too,
> so i want know :
> <123>server can have new leader??
> and 
> <4567>server can have new leader??

I still do not understand what you're asking, but I will try to guess.

An ensemble with 7 servers can survive 3 failures.

If you are describing a situation with 7 servers where the 1, 2, and 3 
servers are disconnected from the rest but can still communicate with 
each other, those 3 servers will NOT be able to achieve quorum.  If the 
other 4 servers can talk to each other, then they WILL achieve quorum 
and elect a leader.  This is how ZK is designed, and I really doubt that 
it will ever change.

Thanks,
Shawn