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 low-latency peers #12

Open
cloudhead opened this issue Jan 23, 2021 · 0 comments
Open

Prefer low-latency peers #12

cloudhead opened this issue Jan 23, 2021 · 0 comments

Comments

@cloudhead
Copy link
Owner

Currently, peer latency is measured in the PingManager, but not used.

  • We should keep track of latencies, persist them (either in the client::peer::Cache or some where else.
  • Use it to decide which peers to connect to
  • Use it to decide which peers to download headers/blocks from

Some notes:

  • We should generally not compromise geo-diveristy when looking for low-latency peers, but having a few low-latency peers is desired
  • Low-latency peer selection can either be via AddressManager::sample being biased towards low-latency peers, or by simply calling sample 2-3 times and picking the peer with the lowest latency.
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