-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
Description
Title: Superfluous minimums in priority load pseudocode
Description:
The pseudocode at the end of the priority levels documentation (https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/priority) seems to contain superfluous minimum.
The priority_load(P_0) function does not need to be taken as the minimum of 100 since health(P_0) * 100 / normalized_total_health <= 100 always holds.
To see this:
- If
normalized_total_health == 100, thenhealth(P_0) * 100 / normalized_total_health = health(P_0) <= 100by definition. - If
normalized_total_health == Σ(health(P_0)...health(P_X))thenhealth(P_0) / normalized_total_health <= 1and so multiplying both sides 100 we again havehealth(P_0) * 100 / normalized_total_health <= 100.
I don't believe this holds for the more general priority_load(P_X) case though, so perhaps it's there just to be explicit.
Reactions are currently unavailable