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

Prefer connected + HRW peer selection strategy #640

Open
prashantv opened this issue Aug 4, 2017 · 0 comments
Open

Prefer connected + HRW peer selection strategy #640

prashantv opened this issue Aug 4, 2017 · 0 comments

Comments

@prashantv
Copy link
Contributor

HRW hashing works well for load distribution, but if the preferred peer is down, we'll still keep trying to connect to it on every single RPC. This is fine if we have a low number of RPCs, but can have high overhead on high RPS calls.

I think the behaviour we want is:

  • Have a background goroutine that connects to the most available preferred peer
  • On a request, try to find the most preferred peer that is connected
  • If there are not connected peers, then return the top preferred peer (even if it's unconnected)

The background goroutine should ensure that we have connections to the top N peers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant