Skip to content
This repository was archived by the owner on Sep 25, 2020. It is now read-only.

Conversation

@BinChang
Copy link

@BinChang BinChang commented Mar 1, 2016

Count # of consecutive req_timeout, and if it is too high, mark it as not healthy. If the endpoint is still legit, pinger will bring it back, otherwise if the endpoint is totally down, the endpoint will stay as unhealthy.

This helps us find dead endpoints whose server box is totally down.

… not healthy. If the endpoint is still ligit, pinger will bring it back, otherwise say the endpoint is totally down, the endpoint will stay as not healthy.

This helps us find dead endpoints that the server box is totally down.
@BinChang
Copy link
Author

BinChang commented Mar 1, 2016

@mranney @Raynos @weikai77, This is the draft diff, let me know if you guys have any concerns?

In parallel, I am working on some tests.

@BinChang
Copy link
Author

BinChang commented Mar 1, 2016

@zhijinli this is the diff to handle the dead host issue.

@Raynos
Copy link
Collaborator

Raynos commented Mar 1, 2016

@BinChang
Copy link
Author

BinChang commented Mar 1, 2016

@Raynos That's the same idea, tChannel manages tcp socket errors directly, but lb_pool runs request through http.

PoolEndpoint.prototype.request_succeeded = function (request, response, body) {
this.successes++;
this.complete(null, request, response, body);
this.reset_req_timeout_count();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also reset() in the else case in request_failed ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants