geodns icon indicating copy to clipboard operation
geodns copied to clipboard

Health-check for endpoints

Open vteslia opened this issue 9 years ago • 5 comments

Hi,

is it possible to implement health-check for endpoints like in consul (https://github.com/hashicorp/consul) for prevent routing traffic to unhealthy nodes?

And add additional field 'check' for records. Something like:

"mongodb": {"a": [ [ "1.2.3.4", "100", "checks": [{"name":"Check Site","script": "/usr/bin/check_mongo.py --host 1.2.3.4 --port 27017","interval": "5s"}] ] ] }

vteslia avatar Sep 23 '15 08:09 vteslia

Hi,

I've already implemented (awaiting comments and merge) health tests with this commit: https://github.com/abligh/geodns/commit/0bd80674ebb443aa24afdd74ba7026cad7944a6e which is in this pull request: https://github.com/abh/geodns/pull/73

Assuming the script returns success / failure, that will work as standard using the exec health test type. Alternatively, you could write your own health test type that calls the consul API. You might see how I did nodeping and pingdom.

Finally, without the health test stuff above, you could always write your own framework to rewrite you JSON files dependent upon the result of your health tests.

Alex

abligh avatar Sep 24 '15 12:09 abligh

Hi Alex,

thank you very much for your work. I am going to test it right now.

you could always write your own framework to rewrite you JSON files dependent upon the result of your health tests.

I have tried this way at first but my solution was cumbersome.

vteslia avatar Sep 24 '15 14:09 vteslia

Any progress on this?

sspans avatar Feb 01 '16 15:02 sspans

These features look really good. @abh - Please would you merge the same

AnoopAlias avatar Feb 13 '18 05:02 AnoopAlias

@abh Any updates?

arhue avatar Jan 05 '19 08:01 arhue