Skip to content

Superfluous minimum in priority load pseudocode #15824

@dippynark

Description

@dippynark

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, then health(P_0) * 100 / normalized_total_health = health(P_0) <= 100 by definition.
  • If normalized_total_health == Σ(health(P_0)...health(P_X)) then health(P_0) / normalized_total_health <= 1 and so multiplying both sides 100 we again have health(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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions