-
Notifications
You must be signed in to change notification settings - Fork 913
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
[ISSUE-5705] Support for degraded health #5741
base: main
Are you sure you want to change the base?
[ISSUE-5705] Support for degraded health #5741
Conversation
f20ed57
to
665ec13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @seonWKim! 🙇
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthCheckService.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthCheckServiceBuilder.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthStatus.java
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/SettableHealthStatusChecker.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthCheckServiceBuilder.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthCheckService.java
Show resolved
Hide resolved
52fdd7b
to
aed0a93
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 🙇
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthStatus.java
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthCheckService.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthCheckService.java
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthCheckServiceBuilder.java
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthCheckServiceBuilder.java
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthCheckService.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there!
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthStatus.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthStatus.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/DefaultHealthCheckUpdateHandler.java
Outdated
Show resolved
Hide resolved
…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`
1548102
to
487997f
Compare
Removed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall 👍 Left a minor suggestion
core/src/main/java/com/linecorp/armeria/server/healthcheck/DefaultHealthCheckUpdateHandler.java
Outdated
Show resolved
Hide resolved
Looks better. I don't think we need to split them into different classes. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably the last of my comments.
Please also address https://github.com/line/armeria/pull/5741/files#r1651918233 🙏
core/src/main/java/com/linecorp/armeria/server/healthcheck/SettableHealthChecker.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthChecker.java
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthChecker.java
Show resolved
Hide resolved
- Update access modifier of `DefaultHealthCheckUpdateHandler` - Update `ScheduledHealthChecker` to use healthStatus - Remove unnecessary `this`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some more nit comments 👍
core/src/main/java/com/linecorp/armeria/server/healthcheck/DefaultHealthCheckUpdateHandler.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthCheckServiceBuilder.java
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthCheckUpdateListener.java
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthChecker.java
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/SettableHealthChecker.java
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/SettableHealthChecker.java
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/healthcheck/ScheduledHealthChecker.java
Show resolved
Hide resolved
- Add @UnstableApi
a13308f
to
74f702d
Compare
74f702d
to
2f610ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 👍 👍
Motivation:
Add support for degraded health.
Modifications:
HealthStatus
enum which can represent the health status of a serverhealthStatus()
method inHealthChecker
for fine-grained representation of server's statusdegradedResponse
which 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
degraded
server status in addtion to healthy and unhealthy.