consul-client icon indicating copy to clipboard operation
consul-client copied to clipboard

Non blocking health check support

Open ziarek opened this issue 6 years ago • 2 comments

Hi guys,

While performing a service health check the request below is sent to Consul agent.

http://127.0.0.1:8500/v1/health/service/myservice?index=33500766&wait=10s&passing=true

I'd like to use cached query and perform below request

http://127.0.0.1:8500/v1/health/service/myservice?cached

Is the ?cached parameter supported by this library?

The API allows to set a header to determine max cache age (max-age=) - is that also supported?

Cheers Darek

ziarek avatar Mar 09 '19 00:03 ziarek

that's a newer feature in Consul that hasn't been implemented. PRs welcome

rickfast avatar Apr 09 '19 20:04 rickfast

I need to implement the scenario in service1 where I want to know health of service2 and if it is up/running then will take action accordingly. I want to know the health of a service on a separate thread or basically in a non-blocking way. How do I implement it using catalog watch ? Is there any other way to implement as well ?

rutuls avatar Mar 05 '21 10:03 rutuls