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

Introduce heap balancer for the gRPC connection pool #589

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jul 31, 2024

  1. Introduce heap balancer for the gRPC connection pool

    We observed increased latencies in builds that use the round-robin balancer.
    It is possible that the load is not uniformly spread across the pool, particularly
    around streams.
    This could cause client-side queuing on hot connections which may explain
    the increased latencies.
    
    The heap-based balancer keeps track of the number of invocation
    and streaming requests per connection and selects the least used connection.
    One big caveat is that the pool is not aware of active connections.
    The number of stream requests is not necessarily the number of active streams
    on the connection. Without that knowledge, it is still possible for some connections
    to be used more than others.
    E.g. if long streaming requests accumulate on the same connection.
    mrahs committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    a10c115 View commit details
    Browse the repository at this point in the history