[ISSUE-5705] Support for degraded health #5741
Conversation
f20ed57 to
665ec13
Compare
52fdd7b to
aed0a93
Compare
jrhee17
left a comment
There was a problem hiding this comment.
Looks good overall 👍 I think some client-side changes will be needed, but I prefer I do this to ensure compatibility with xDS-side requirements. Left some minor comments 🙇
…bleHealthChecker`
Co-authored-by: jrhee17 <guins_j@guins.org>
…cify HealthStatus
- Add javadoc on `HealthStatus` - Checks for IF-NONE-MATCH header for specific `HealthStatus` - Add `HealthStatusUpdateHandler`
| /** | ||
| * The {@link Server} is under maintenance and unable to serve requests. | ||
| */ | ||
| UNDER_MAINTENANCE(100, false); |
There was a problem hiding this comment.
Better to put UNDER_MAINTENANCE after STOPPING? We also need to update the Javadoc of priority to explain the value means.
| this.pendingResponses.stream() | ||
| .filter(res -> { | ||
| if (res.pollHealthStatus) { | ||
| return res.interestedStatus != healthStatus; |
There was a problem hiding this comment.
Shouldn't it filter when
- the
healthStatusis changed from its previoushealthStatus res.interestedStatus == healthStatus;
|
Hi, @minwoox :) Thanks for the review. I'll take a look |
|
I completely missed this, greatly sorry to all the reviewers. If this has not been handled yet, I will take care of it immediately. |
|
Tick the box to add this pull request to the merge queue (same as
|
Motivation:
Add support for degraded health.
Modifications:
HealthStatusenum which can represent the health status of a serverhealthStatus()method inHealthCheckerfor fine-grained representation of server's statusdegradedResponsewhich shows that the server's status is being degraded.I think adding new health check service which returns
HealthStatus(instead of boolean) might be an alternate option. But because this PR is before any reviews, I've just implemented feature on top ofHealthCheckService.Result:
Users can now receive notification for degraded server status like below
{"healthy":true, "degraded":true}degradedserver status in addtion to healthy and unhealthy.