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

balance: Specialize the balancer for P2C #288

Merged
merged 18 commits into from
Jun 4, 2019

Commits on May 30, 2019

  1. balance: Specialize the balancer for P2C

    As described in tower-rs#286, `Balance` had a few problems:
    - it is responsible for driving all inner services to readiness, making
      its `poll_ready` O(n) and not O(1);
    - the `choose` abstraction was a hinderance. If a round-robin balancer
      is needed it can be implemented separately without much duplicate
      code; and
    - endpoint errors were considered fatal to the balancer.
    
    This changes replaces `Balance` with `P2CBalance` and removes the
    `choose` module.
    
    Endpoint service failures now cause the service to be removed from the
    balancer gracefully.
    
    Endpoint selection is now effectively constant time, though it biases
    for availability in the case when random selection does not yield an
    available endpoint.
    
    `tower-test` had to be updated so that a mocked service could fail after
    advertising readiness.
    olix0r committed May 30, 2019
    Configuration menu
    Copy the full SHA
    68ff2df View commit details
    Browse the repository at this point in the history
  2. remove unneeded future impl

    olix0r committed May 30, 2019
    Configuration menu
    Copy the full SHA
    cf5cc8c View commit details
    Browse the repository at this point in the history
  3. constructor naming...

    olix0r committed May 30, 2019
    Configuration menu
    Copy the full SHA
    499ef37 View commit details
    Browse the repository at this point in the history
  4. fmt

    olix0r committed May 30, 2019
    Configuration menu
    Copy the full SHA
    de78134 View commit details
    Browse the repository at this point in the history
  5. Introduce MakeP2CBalance

    The balance layer now operates over MakeP2CBalance, which composes over
    layers that produce Discover instances.
    olix0r committed May 30, 2019
    Configuration menu
    Copy the full SHA
    538e737 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c1c6808 View commit details
    Browse the repository at this point in the history
  7. Impl clone for MakeP2CBalance

    olix0r committed May 30, 2019
    Configuration menu
    Copy the full SHA
    ba8653a View commit details
    Browse the repository at this point in the history

Commits on May 31, 2019

  1. remove commented code

    olix0r committed May 31, 2019
    Configuration menu
    Copy the full SHA
    a998084 View commit details
    Browse the repository at this point in the history
  2. Remove the choose module

    olix0r committed May 31, 2019
    Configuration menu
    Copy the full SHA
    5d00a44 View commit details
    Browse the repository at this point in the history
  3. Move P2C into a submodule

    olix0r committed May 31, 2019
    Configuration menu
    Copy the full SHA
    d034739 View commit details
    Browse the repository at this point in the history
  4. Cleanup per review

    olix0r committed May 31, 2019
    Configuration menu
    Copy the full SHA
    703bd83 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    75cdf4b View commit details
    Browse the repository at this point in the history
  6. incorrect comment

    olix0r committed May 31, 2019
    Configuration menu
    Copy the full SHA
    335d29f View commit details
    Browse the repository at this point in the history
  7. +debug_assert

    olix0r committed May 31, 2019
    Configuration menu
    Copy the full SHA
    6d29026 View commit details
    Browse the repository at this point in the history
  8. +debug_assert

    olix0r committed May 31, 2019
    Configuration menu
    Copy the full SHA
    9ad8ce8 View commit details
    Browse the repository at this point in the history
  9. temp val

    olix0r committed May 31, 2019
    Configuration menu
    Copy the full SHA
    a7c9b49 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7479265 View commit details
    Browse the repository at this point in the history
  11. less brittle repair_index

    olix0r committed May 31, 2019
    Configuration menu
    Copy the full SHA
    264b2a8 View commit details
    Browse the repository at this point in the history