-Re: How dose zookeeper handle fault-detect in distributed storage system
Hello Fengguang Gong,
I think there is more than one answer to your question.
One possibility would be to have each of your nodes as zookeeper clients
that create an ephemeral node in the zookeeper data, and query and most
likely subscribe to changes so that they are notified about the status of
the ephemeral zookeeper nodes created by the rest of the nodes. If you are
only interested in dispatch and middleware nodes knowing about the status
of store nodes, then you could have ephemeral zookeeper nodes created only
by the store nodes, and dispatch and middleware nodes querying and
subscribing to the resulting status.
You will need to make sure that the events of store nodes going up and down
are reflected correctly in the creation and deletion of the zookeeper node.
You will also have to tune the heartbeat between zookeeper client and
server so that it fits your requirements.
Does that suit you?
Any other options?
Good luck :-)
On Wed, Sep 11, 2013 at 8:17 AM, fengguang gong <[EMAIL PROTECTED]>wrote:
> Hi all:
> Recently my lab want to use zk to manager our cluster(Fault
> detect). Our cluster
> includes three kinds of node:
> 1. dispatch node : load balance and dispatch data.
> 2. store node: receive data from dispatch node and store.
> 3. middleware: query data from all the store node.
> Here my question is : How dose zk handle fault-detect in this system(how
> dose dispatch node
> and middleware know that a store node is down).