health filter: cache degraded health checks#5659
Merged
mattklein123 merged 3 commits intoenvoyproxy:masterfrom Jan 22, 2019
Merged
health filter: cache degraded health checks#5659mattklein123 merged 3 commits intoenvoyproxy:masterfrom
mattklein123 merged 3 commits intoenvoyproxy:masterfrom
Conversation
added 2 commits
January 18, 2019 16:25
Updates the health check filter to cache whether the health check returned the degraded label and insert the header when serving a cached value. Signed-off-by: Snow Pettersen <snowp@squareup.com>
mattklein123
requested changes
Jan 21, 2019
Member
mattklein123
left a comment
There was a problem hiding this comment.
Thanks looks good. Small comment.
/wait
|
|
||
| Http::Code getCachedResponseCode() { return last_response_code_; } | ||
| void setCachedResponseCode(Http::Code code) { | ||
| std::pair<Http::Code, bool> getCachedResponseCode() { |
Member
There was a problem hiding this comment.
nit: Can you rename getCachedResponseCode() and setCachedResponseCode() to something more descriptive now that we are doing more stuff? s/Code/Data or something like that?
Signed-off-by: Snow Pettersen <snowp@squareup.com>
danzh2010
pushed a commit
to danzh2010/envoy
that referenced
this pull request
Jan 24, 2019
Updates the health check filter to cache whether the health check returned the degraded label and insert the header when serving a cached value. Signed-off-by: Snow Pettersen <snowp@squareup.com> Signed-off-by: Dan Zhang <danzh@google.com>
fredlas
pushed a commit
to fredlas/envoy
that referenced
this pull request
Mar 5, 2019
Updates the health check filter to cache whether the health check returned the degraded label and insert the header when serving a cached value. Signed-off-by: Snow Pettersen <snowp@squareup.com> Signed-off-by: Fred Douglas <fredlas@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the health check filter to cache whether the health check
returned the degraded label and to insert the degraded header when serving a cached
degraded response.
Without this, each cached response will essentially clear the degraded health check
value, causing the health value of hosts to flap between healthy and degraded.
Signed-off-by: Snow Pettersen snowp@squareup.com
Description:
Risk Level: Medium
Testing: Added UT to verify
Docs Changes: n/a
Release Notes: n/a
#5063