Health check endpoint ignores fee escalation: #3914
Closed
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.
High Level Overview of Change
Changed the health check endpoint (
https://[host]:[peerport]/health
) to only consider and consume the portion of theload_factor
that is limited to the server. This ignores any changes related to fee escalation. Fee escalation describes how busy the ledger is, not the server.Also refactored that function to use
jss
labels instead of strings for JSON fields.Context of Change
I was looking at the health of my server and was annoyed when it went into warning status solely with a load factor in the 500's because fee escalation kicked in.
It is my opinion that this is not correct or desired behavior. I may be wrong about that, so that discussion would be appropriate here.
Type of Change
Before / After
Before: If the server's
load_factor
goes over 100 because of fee escalation, the/health
endpoint will return a 503 result code and include theload_factor
in the result JSON.After: If the server's
load_factor
goes over 100 because of fee escalation, but the server's internal load is under 100, the/health
endpoint will return a 200, and not includeload_factor
in the JSON. If the internal load goes over 100 because the server itself is busy, it will continue to be flagged by/health
as before.