.Hi Veerbhan,
Please do not cross-post questions. I see similar questions now on
about 5 GitHub issues and that makes it difficult to answer in one
place, and dilutes the ability of the community to find answers later.
The servers do replicate the health check information across all the
servers, so if the leader Consul server goes down then another Consul
server will elect a leader and take over, and will have a complete set
of state to work with. There's nothing you need to do as an operator
to shift any data to the other Consul servers.
From your other posts it sounded like you were concerned if the
serfHealth check fails on a Consul client whether you'd lose all the
services on that client's node. In general, yes, the serfHealth check
is implicitly AND-end with every service check on that node. We've
worked hard to ensure that the serfHealth check doesn't give false
positives (
https://www.hashicorp.com/blog/making-gossip-more-robust-with-lifeguard/).
If you are using Consul's DNS interface then yes, Consul will no
longer include any service instances from that failed node in DNS
requests. Usually things connecting to that node will start to
experience errors, will make another DNS request, and then will get a
different, healthy instance of the service because the failed node
isn't included in the results because of the serfHealth check being
failed. If you are using DNS and somehow the serfHealth check failed
incorrectly it shouldn't harm any existing connections to your
services, but it would prevent new connections over that period.
If you are using the Consul APIs directly like
https://www.consul.io/api/health.html#list-nodes-for-service you will
get back that the serfHealth check is failed and its up to you to
interpret that in your application.
> Can you please suggest, how can I get services which are healthy even if their node is down/failing?
Consul's not set up to do that out of the box, at least if you are
using the DNS interface. If you wanted to ignore the serfHealth check,
which is definitely not recommended, then you could use the health API
and filter it out there. It's a pretty deep part of Consul and
fundamental to correct operation of Consul's edge-triggered health
check update model as well as proper operation of locks and sessions,
so I don't think we'd be able to provide a way to disable the
serfHealth check. This talk explains why we have the serfHealth check
in lots of detail -
https://www.youtube.com/watch?v=CDQaqiRhTtk.
Hope that helps!
-- James
>
https://groups.google.com/d/msgid/consul-tool/CAKpDd0o1J1UJxc7XwQofeJgX1CwASoFmJ75%2BRKwCGNSMhQ66gQ%40mail.gmail.com.