line / armeria

Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
https://armeria.dev
Apache License 2.0
4.73k stars 899 forks source link

[ISSUE-5705] Support for degraded health #5741

Open seonWKim opened 3 weeks ago

seonWKim commented 3 weeks ago

Motivation:

Add support for degraded health.

Modifications:

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}
github-actions[bot] commented 3 weeks ago

🔍 Build Scan® (commit: 03b58998b0f516851ae4ecbe5bbed4d0e936ef0e)

Job name Status Build Scan®
build-windows-latest-jdk-21 https://ge.armeria.dev/s/fkx54r7t6ept2
build-self-hosted-unsafe-jdk-8 https://ge.armeria.dev/s/qklmc4f7wlxho
build-self-hosted-unsafe-jdk-21-snapshot-blockhound https://ge.armeria.dev/s/lygfz7up3orp2
build-self-hosted-unsafe-jdk-17-min-java-17-coverage https://ge.armeria.dev/s/gkzmsnwkinmiw
build-self-hosted-unsafe-jdk-17-min-java-11 https://ge.armeria.dev/s/zuhkqmmkrmhmy
build-self-hosted-unsafe-jdk-17-leak https://ge.armeria.dev/s/ozlftpkhomptq
build-self-hosted-unsafe-jdk-11 https://ge.armeria.dev/s/mkzctgrd4muym
build-macos-12-jdk-21 https://ge.armeria.dev/s/obrj3klg3uk3k
seonWKim commented 2 weeks ago

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

seonWKim commented 1 week ago

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. 👍