[GH-ISSUE #85] Health-check for endpoints #204

Open
opened 2026-03-01 17:24:33 +03:00 by kerem · 5 comments
Owner

Originally created by @vteslia on GitHub (Sep 23, 2015).
Original GitHub issue: https://github.com/abh/geodns/issues/85

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"}] ] ] }
Originally created by @vteslia on GitHub (Sep 23, 2015). Original GitHub issue: https://github.com/abh/geodns/issues/85 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"}] ] ] } ```
Author
Owner

@abligh commented on GitHub (Sep 24, 2015):

Hi,

I've already implemented (awaiting comments and merge) health tests with this commit: github.com/abligh/geodns@0bd80674eb 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

<!-- gh-comment-id:142917549 --> @abligh commented on GitHub (Sep 24, 2015): 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
Author
Owner

@vteslia commented on GitHub (Sep 24, 2015):

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.

<!-- gh-comment-id:142937165 --> @vteslia commented on GitHub (Sep 24, 2015): 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.
Author
Owner

@sspans commented on GitHub (Feb 1, 2016):

Any progress on this?

<!-- gh-comment-id:178009756 --> @sspans commented on GitHub (Feb 1, 2016): Any progress on this?
Author
Owner

@AnoopAlias commented on GitHub (Feb 13, 2018):

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

<!-- gh-comment-id:365154733 --> @AnoopAlias commented on GitHub (Feb 13, 2018): These features look really good. @abh - Please would you merge the same
Author
Owner

@arhue commented on GitHub (Jan 5, 2019):

@abh Any updates?

<!-- gh-comment-id:451639304 --> @arhue commented on GitHub (Jan 5, 2019): @abh Any updates?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/geodns#204
No description provided.