Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable load balancing policy extensions #17400

Merged
merged 10 commits into from
Aug 14, 2021

Commits on Jul 19, 2021

  1. Enable load balancing policy extensions

    Enables LOAD_BALANCING_POLICY_CONFIG enum value in LbPolicy and supports
    typed load balancers specified in load_balancing_policy. Continues work
    done by Charlie Getzen <charliegetzenlc@gmail.com> in PR envoyproxy#15827.
    
    Custom load balancers specified by load_balancing_policy are created as
    implementations of ThreadAwareLoadBalancer. Thread-local load balancers
    can be implemented as thread-aware load balancers that contain no logic
    at the thread-aware level, i.e. the purpose of the thread-aware LB is
    solely to contain the factory used to instantiate the thread-local LBs.
    (In the future it might be appropriate to provide a construct that
    abstracts away thread-aware aspects of ThreadAwareLoadBalancer for LBs
    that don't need to be thread-aware.)
    
    A cluster that uses LOAD_BALANCING_POLICY_CONFIG may not also set a
    subset LB configuration. If the load balancer type makes use of
    subsetting, it should include a subset configuration in its own
    configuration message. Future work on load balancing extensions should
    include moving the subset LB to use load balancing extensions.
    
    Similarly, a cluster that uses LOAD_BALANCING_POLICY_CONFIG may not set
    the CommonLbConfig, and it is not passed into load balancer creation
    (mostly owing to its dubious applicability as a top level configuration
    message to hierarchical load balancing policy). If the load balancer type
    makes use of the CommonLbConfig, it should include a CommonLbConfig in
    the configuration message for the load balancing policy.
    
    Considerations for migration of existing load balancers:
    
    - pieces of the ThreadAwareLoadBalancerBase implementation are specific
    to the built-in hashing load balancers and should be moved into a base
    class specifically for hashing load balancers. As it stands, custom load
    balancing policies are required to implement a createLoadBalancer()
    method even if the architecture of the LB policy does not require a
    hashing load balancer. I think we would also benefit from disentangling
    ThreadAwareLoadBalancerBase from LoadBalancerBase, as the former never
    actually does any host picking.
    
    - as we convert existing thread-local load balancers to thread-aware
    load balancers, new local LBs will be re-created upon membership
    changes. We should provide a mechanism allowing load balancers to
    control whether this rebuild should occur, e.g. a callback that calls
    create() for thread-aware load balancers by default, which can be
    overridden to do nothing for thread-local LBs.
    
    Signed-off-by: Eugene Chan <eugenechan@google.com>
    pianiststickman committed Jul 19, 2021
    Configuration menu
    Copy the full SHA
    de46b28 View commit details
    Browse the repository at this point in the history
  2. clang-tidy fixes

    Signed-off-by: Eugene Chan <eugenechan@google.com>
    pianiststickman committed Jul 19, 2021
    Configuration menu
    Copy the full SHA
    ab6c5d3 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2021

  1. Configuration menu
    Copy the full SHA
    02e310b View commit details
    Browse the repository at this point in the history
  2. Fix whitespace

    Signed-off-by: Eugene Chan <eugenechan@google.com>
    pianiststickman committed Jul 20, 2021
    Configuration menu
    Copy the full SHA
    c5fb808 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2021

  1. struct -> class

    Signed-off-by: Eugene Chan <eugenechan@google.com>
    pianiststickman committed Aug 2, 2021
    Configuration menu
    Copy the full SHA
    13dc8db View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2021

  1. Convert load balancing policy to TypedExtensionConfig

    Removes LoadBalancingPolicy.Policy type from v4alpha. Changes the type of an unimplemented field.
    
    Signed-off-by: Eugene Chan <eugenechan@google.com>
    pianiststickman committed Aug 3, 2021
    Configuration menu
    Copy the full SHA
    f362afd View commit details
    Browse the repository at this point in the history
  2. Mark LoadBalancingPolicy.Policy as deprecated and fix API shadows

    Signed-off-by: Eugene Chan <eugenechan@google.com>
    pianiststickman committed Aug 3, 2021
    Configuration menu
    Copy the full SHA
    e8f979b View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2021

  1. API changes

    Signed-off-by: Eugene Chan <eugenechan@google.com>
    pianiststickman committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    8915a3f View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2021

  1. Deprecate in v3 instead of v2

    Signed-off-by: Eugene Chan <eugenechan@google.com>
    pianiststickman committed Aug 11, 2021
    Configuration menu
    Copy the full SHA
    72c3628 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2021

  1. Remove deprecated, unused fields

    Signed-off-by: Eugene Chan <eugenechan@google.com>
    pianiststickman committed Aug 13, 2021
    Configuration menu
    Copy the full SHA
    e03ac8a View commit details
    Browse the repository at this point in the history