Skip to content

[ISSUE-5705] Support for degraded health #5741

Open
seonWKim wants to merge 22 commits into
line:mainfrom
seonWKim:feature/ISSUE-5705-degradable-health-checker
Open

[ISSUE-5705] Support for degraded health #5741
seonWKim wants to merge 22 commits into
line:mainfrom
seonWKim:feature/ISSUE-5705-degradable-health-checker

Conversation

@seonWKim

@seonWKim seonWKim commented Jun 8, 2024

Copy link
Copy Markdown
Contributor

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

@trustin trustin left a comment

Copy link
Copy Markdown
Contributor

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

@jrhee17 jrhee17 left a comment

Copy link
Copy Markdown
Contributor

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 🙇

@trustin trustin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Almost there!

Comment thread core/src/main/java/com/linecorp/armeria/server/healthcheck/HealthStatus.java Outdated

@minwoox minwoox left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@minwoox minwoox modified the milestones: 1.35.0, 1.36.0 Dec 30, 2025
@seonWKim

seonWKim commented Jan 2, 2026

Copy link
Copy Markdown
Contributor Author

I completely missed this, greatly sorry to all the reviewers. If this has not been handled yet, I will take care of it immediately.
@minwoox, is this issue still open? I’ll work on it as quickly as possible.

@ikhoon ikhoon modified the milestones: 1.36.0, 1.37.0 Feb 2, 2026
@github-actions github-actions Bot added the Stale label Mar 8, 2026
@ikhoon ikhoon modified the milestones: 1.38.0, 1.39.0 Apr 3, 2026
@github-actions github-actions Bot removed the Stale label Apr 7, 2026
@minwoox minwoox modified the milestones: 1.39.0, 1.40.0 May 8, 2026
@jrhee17 jrhee17 modified the milestones: 1.40.0, 1.41.0 Jun 10, 2026
@github-actions github-actions Bot added the Stale label Jul 12, 2026
@mergify

mergify Bot commented Jul 12, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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