Support channel level application health check options#2964
Merged
Huixxi merged 4 commits intoapache:masterfrom May 18, 2025
Merged
Support channel level application health check options#2964Huixxi merged 4 commits intoapache:masterfrom
Huixxi merged 4 commits intoapache:masterfrom
Conversation
4eb3e42 to
5496691
Compare
wwbmmm
reviewed
May 8, 2025
Contributor
|
Thank you for contributing! This is a useful feature. |
eb3cc66 to
bf47002
Compare
Contributor
Author
Thank you for your code review very much. I have modified it according to your suggestion. Please check if there is anything else that needs to be modified. |
…omputeChannelSignature
bf47002 to
84071ed
Compare
wwbmmm
reviewed
May 10, 2025
Contributor
Author
Contributor
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What problem does this PR solve?
Current Application-Layer Health Check Mechanism
The current application-layer health check mechanism is configured via the -health_check_path flag. If this flag is left empty, the health check is disabled. However, since gflag is a global variable, once set, it enables the application-layer health check for all downstream services accessed by the service.
For complex services that may interact with dozens or even hundreds of downstream services (some of which might not be brpc-based and could instead be Go/Java services), not all downstream services necessarily support health check requests. Even for those that do, the health check request paths (URLs) may vary across services. Therefore, it is necessary to support channel-level configuration for application-layer health check parameters.
Issue Number:
Problem Summary:
What is changed and the side effects?
no
Changed:
About This PR
This PR maintains backward compatibility with the existing gflag-based configuration for health check paths and timeouts while introducing support for setting health check parameters via members of ChannelOptions (hc_option). Parameters in ChannelOptions (hc_option) take precedence over the global gflag settings. If a parameter is not specified in ChannelOptions, the corresponding gflag value will be used as the fallback.
Side effects:
Check List: