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

Support 3xx HTTP status codes for health check #3364

Merged
merged 2 commits into from
May 23, 2018
Merged

Support 3xx HTTP status codes for health check #3364

merged 2 commits into from
May 23, 2018

Conversation

SniperCZE
Copy link
Contributor

@SniperCZE SniperCZE commented May 22, 2018

What does this PR do?

Allows all 3xx HTTP status codes (based on RFC) to pass healthcheck.

Motivation

PR #3362 adds only support for 2xx HTTP status codes, but according to RFC, 3xx are valid answers too and should not make server pushed out of pool, so this improve fix of #3081.

More

  • Added/updated tests
  • Added/updated documentation

@dtomcej
Copy link
Contributor

dtomcej commented May 22, 2018

Hello @SniperCZE Other proxies such as nginx only use 200-399 for response range.

If you require the full range, can you link to the RFC you are referring to? We are wondering if the 1xx range should be included in this (being that they are information responses, usually used to confirm/upgrade connections).

Would you be ok with just 200-399?

@ldez ldez changed the title support all non-error (1xx, 2xx, 3xx) HTTP status codes for health check Support more HTTP status codes for health check May 22, 2018
@SniperCZE
Copy link
Contributor Author

Hi @dtomcej I mean RFC 7231. There is section 6 about status codes and only 4xx and 5xx are labeled as error status. 1xx are informational - used ie. for upgrade http -> websockets. On the other hand, 1xx status codes are quite rare (in terms of loadbalancer healthcheck URLs) so probably 200 - 399 will be OK.

@ldez ldez added this to the 1.7 milestone May 23, 2018
Copy link
Contributor

@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

@ldez ldez changed the title Support more HTTP status codes for health check Support 3xx HTTP status codes for health check May 23, 2018
Copy link
Contributor

@dtomcej dtomcej left a comment

Choose a reason for hiding this comment

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

LGTM
:shipit:

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
Contributor

@nmengin nmengin 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.

7 participants