Re: Questions about network segmentation problems
Thanks a lot for your answers. Best regards, VN On Wed, Apr 29, 2020 at 5:07 AM Szalay-Bekő Máté wrote: > also, if you want, you can enable read-only mode in the ZooKeeper > server. Read-only mode allows client sessions to connect to the server > even when the server might be partitioned from the quorum. In this mode the > clients can still read values from the ZK service, but will be unable to > write values and see changes from other clients. Also beside enabling this > on server-side, you have to allow this on the client side as well when you > initiate the connection. By default the Read-only mode is disabled and > ZooKeeper behaves as Chris described. > > Kind regards, > Mate > > On Tue, Apr 28, 2020 at 6:27 PM Chris T. wrote: > > > 1: It will close the client port and will remain unavailable for clients > > until it can form or join a quorum (majority). > > 2: No, see above. > > 3+4: They will keep trying to connect to the Zookeeper servers in the > > connection string until they find one that works. The exact messages you > > get depend on the client application or framework you are using. For > > example Apache Curator framework or the internal client implementations > of > > SOLR or KAFKA all have different behaviour and messages messages. > Something > > like Connection State Lost, Client Connection timed out, Attempting > > reconnect etc... > > > > Regards, > > > > Chris > > > > > > On Tue, Apr 28, 2020 at 5:47 PM Vincent Ngan > > wrote: > > > > > Hi, > > > > > > I would like to know what will happen to ZooKeeper servers and the > > clients > > > connected to them when a network segmentation occurs. > > > > > > Supposing a network segmentation happens. One of the ZK servers > > > looses contact with all the other ZK servers. This ZK server is still > but > > > it should know that it is not among the majority of a quorum. Then, > > > > > >1. What will happen to this isolated ZK server? > > >2. Will it still function and serve client requests? > > >3. If there are clients also located in the same isolated segment > and > > >are currently connected to this ZK server, what will happen to these > > >clients? > > >4. What errors code and messages will these clients detect? > > > > > > Best regards, > > > VN > > > > > >
Re: Questions about network segmentation problems
also, if you want, you can enable read-only mode in the ZooKeeper server. Read-only mode allows client sessions to connect to the server even when the server might be partitioned from the quorum. In this mode the clients can still read values from the ZK service, but will be unable to write values and see changes from other clients. Also beside enabling this on server-side, you have to allow this on the client side as well when you initiate the connection. By default the Read-only mode is disabled and ZooKeeper behaves as Chris described. Kind regards, Mate On Tue, Apr 28, 2020 at 6:27 PM Chris T. wrote: > 1: It will close the client port and will remain unavailable for clients > until it can form or join a quorum (majority). > 2: No, see above. > 3+4: They will keep trying to connect to the Zookeeper servers in the > connection string until they find one that works. The exact messages you > get depend on the client application or framework you are using. For > example Apache Curator framework or the internal client implementations of > SOLR or KAFKA all have different behaviour and messages messages. Something > like Connection State Lost, Client Connection timed out, Attempting > reconnect etc... > > Regards, > > Chris > > > On Tue, Apr 28, 2020 at 5:47 PM Vincent Ngan > wrote: > > > Hi, > > > > I would like to know what will happen to ZooKeeper servers and the > clients > > connected to them when a network segmentation occurs. > > > > Supposing a network segmentation happens. One of the ZK servers > > looses contact with all the other ZK servers. This ZK server is still but > > it should know that it is not among the majority of a quorum. Then, > > > >1. What will happen to this isolated ZK server? > >2. Will it still function and serve client requests? > >3. If there are clients also located in the same isolated segment and > >are currently connected to this ZK server, what will happen to these > >clients? > >4. What errors code and messages will these clients detect? > > > > Best regards, > > VN > > >
Re: Questions about network segmentation problems
1: It will close the client port and will remain unavailable for clients until it can form or join a quorum (majority). 2: No, see above. 3+4: They will keep trying to connect to the Zookeeper servers in the connection string until they find one that works. The exact messages you get depend on the client application or framework you are using. For example Apache Curator framework or the internal client implementations of SOLR or KAFKA all have different behaviour and messages messages. Something like Connection State Lost, Client Connection timed out, Attempting reconnect etc... Regards, Chris On Tue, Apr 28, 2020 at 5:47 PM Vincent Ngan wrote: > Hi, > > I would like to know what will happen to ZooKeeper servers and the clients > connected to them when a network segmentation occurs. > > Supposing a network segmentation happens. One of the ZK servers > looses contact with all the other ZK servers. This ZK server is still but > it should know that it is not among the majority of a quorum. Then, > >1. What will happen to this isolated ZK server? >2. Will it still function and serve client requests? >3. If there are clients also located in the same isolated segment and >are currently connected to this ZK server, what will happen to these >clients? >4. What errors code and messages will these clients detect? > > Best regards, > VN >
Questions about network segmentation problems
Hi, I would like to know what will happen to ZooKeeper servers and the clients connected to them when a network segmentation occurs. Supposing a network segmentation happens. One of the ZK servers looses contact with all the other ZK servers. This ZK server is still but it should know that it is not among the majority of a quorum. Then, 1. What will happen to this isolated ZK server? 2. Will it still function and serve client requests? 3. If there are clients also located in the same isolated segment and are currently connected to this ZK server, what will happen to these clients? 4. What errors code and messages will these clients detect? Best regards, VN