Skip to content

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!

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
@jrhee17 jrhee17 modified the milestones: 1.31.0, 1.32.0 Nov 5, 2024
@github-actions github-actions bot removed the Stale label Nov 6, 2024
@github-actions github-actions bot added the Stale label Dec 15, 2024
/**
* Tells {@link HealthCheckService} to mark the {@link Server} as 'under maintenance'.
*/
UNDER_MAINTENANCE,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just use MAINTENANCE?

Copy link
Contributor

@minwoox minwoox left a comment

Choose a reason for hiding this comment

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

Hi, @seonWKim!
Sorry about the late review.
I've pushed some fixes and left some comments to discuss. 😉

/**
* The {@link Server} is under maintenance and unable to serve requests.
*/
UNDER_MAINTENANCE(100, false);
Copy link
Contributor

Choose a reason for hiding this comment

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

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;
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it filter when

  • the healthStatus is changed from its previous healthStatus
  • res.interestedStatus == healthStatus;

@github-actions github-actions bot removed the Stale label Feb 16, 2025
@minwoox minwoox modified the milestones: 1.32.0, 1.33.0 Feb 24, 2025
@seonWKim
Copy link
Contributor Author

Hi, @minwoox :)

Thanks for the review. I'll take a look

@github-actions github-actions bot added the Stale label Apr 11, 2025
@ikhoon ikhoon modified the milestones: 1.33.0, 1.34.0 Aug 1, 2025
@github-actions github-actions bot removed the Stale label Aug 3, 2025
@github-actions github-actions bot added the Stale label Sep 7, 2025
@jrhee17 jrhee17 modified the milestones: 1.34.0, 1.35.0 Nov 24, 2025
@github-actions github-actions bot removed the Stale label Nov 28, 2025
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

5 participants