zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raúl Gutiérrez Segalés <...@itevenworks.net>
Subject Re: Can a zookeeper client be made to influence the client-to-server heartbeats?
Date Tue, 08 Jul 2014 05:20:56 GMT
On 7 July 2014 18:39, Sasi <sasi.jarch@gmail.com> wrote:

> In distributed systems that uses Apache Zookeeper for co-ordination, each
> component is a client to the Zookeeper server, and it instantiates a
> zookeeper instance, which in the background is sending heartbeats to the
> zookeeper server. I understand that the time interval for heartbeat
> communication is configurable. In situations when the "component" itself
> goes into a "faulty" state but the "heartbeats" to zookeeper is good and
> unaffected, proper state of this component is not communicated to the rest
> of the components in the system.
>
> Is it possible out of the box, to influence the heartbeat mechanism -
> typically by passing a "status reporting function" to the zookeeper
> instance
> - to "validate" the status of the component before sending the heartbeat ?
>

I don't think so — pings are hard-coded into the protocol and you can't add
payload to them. You'd probably be better off having a thread which does
the health-check of your component and then kills the ZK session if the
health-check failed.


-rgs

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message