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

[ISSUE-5705] Support for degraded health #5741

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

seonWKim
Copy link
Contributor

@seonWKim seonWKim commented Jun 8, 2024

Motivation:

Add support for degraded health.

Modifications:

  • Add HealthStatus enum which can represent the health status of a server
  • Add healthStatus() method in HealthChecker for fine-grained representation of server's status
  • Add degradedResponse 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 of HealthCheckService.

Result:

Users can now receive notification for degraded server status like below

{"healthy":true, "degraded":true}

@seonWKim seonWKim force-pushed the feature/ISSUE-5705-degradable-health-checker branch from f20ed57 to 665ec13 Compare June 8, 2024 08:20
Copy link
Member

@trustin trustin left a comment

Choose a reason for hiding this comment

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

Thanks, @seonWKim! 🙇

@seonWKim seonWKim force-pushed the feature/ISSUE-5705-degradable-health-checker branch from 52fdd7b to aed0a93 Compare June 14, 2024 01:24
Copy link
Contributor

@jrhee17 jrhee17 left a 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 🙇

Copy link
Member

@trustin trustin left a comment

Choose a reason for hiding this comment

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

Almost there!

@seonWKim seonWKim force-pushed the feature/ISSUE-5705-degradable-health-checker branch from 1548102 to 487997f Compare June 22, 2024 02:32
@seonWKim
Copy link
Contributor Author

Removed the [ISSUE-5741] prefix in the commit messages.

Copy link
Contributor

@jrhee17 jrhee17 left a 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

@seonWKim
Copy link
Contributor Author

Question) what do you think of just combining the two HealthCheckUpdateHandler and adding similar logic as HealthCheckService?

Looks better. I don't think we need to split them into different classes. 👍

@jrhee17 jrhee17 added this to the 1.30.0 milestone Jun 26, 2024
Copy link
Contributor

@jrhee17 jrhee17 left a 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 🙏

- Update access modifier of `DefaultHealthCheckUpdateHandler`
- Update `ScheduledHealthChecker` to use healthStatus
- Remove unnecessary `this`
Copy link
Contributor

@jrhee17 jrhee17 left a 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 👍

- Add @UnstableApi
@seonWKim seonWKim force-pushed the feature/ISSUE-5705-degradable-health-checker branch from a13308f to 74f702d Compare July 18, 2024 00:10
@seonWKim seonWKim force-pushed the feature/ISSUE-5705-degradable-health-checker branch from 74f702d to 2f610ee Compare July 18, 2024 00:16
Copy link
Contributor

@jrhee17 jrhee17 left a comment

Choose a reason for hiding this comment

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

👍 👍 👍

@ikhoon ikhoon modified the milestones: 1.30.0, 1.31.0 Aug 2, 2024
@ikhoon ikhoon mentioned this pull request Aug 2, 2024
@github-actions github-actions bot added the Stale label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for degraded health
4 participants