Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggle /ping to artificially return unhealthy response on SIGTERM during requestAcceptGraceTimeout interval #3062

Merged
merged 3 commits into from Mar 22, 2018

Conversation

ravilr
Copy link
Contributor

@ravilr ravilr commented Mar 22, 2018

What does this PR do?

Enhance /ping handler to return non-200 response upon requestAcceptGraceTimeout initiation, iff it is set.

Motivation

Fixes #2969

More

  • Added/updated tests
  • Added/updated documentation

Additional Notes

this is same as abandoned #3031, but rebased against master branch.

@ravilr
Copy link
Contributor Author

ravilr commented Mar 22, 2018

@ldez @marco-jantke please triage and review.

@ldez ldez added the kind/enhancement a new or improved feature. label Mar 22, 2018
@ldez ldez added this to the 1.6 milestone Mar 22, 2018
Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@mmatur mmatur left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution @ravilr
LGTM

Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@emilevauge emilevauge left a comment

Choose a reason for hiding this comment

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

Thanks @ravilr
Small comment on the documentation :)


### Using ping for external Load-balancer rotation health check

If you are running traefik behind a external Load-balancer, and want to configure rotation health check on the Load-balancer to take a traefik instance out of rotation gracefully, you can configure [lifecycle.requestAcceptGraceTimeout](https://github.com/containous/traefik/blob/master/docs/configuration/commons.md#life-cycle) and the ping endpoint will return `503` response on traefik server termination, so that the Load-balancer can take the terminating traefik instance out of rotation, before it stops responding.
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

@emilevauge emilevauge left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants