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

collect latency and failure from every request and adjust latency based on response size #5265

Closed
2 tasks
dshulyak opened this issue Nov 14, 2023 · 0 comments
Closed
2 tasks

Comments

@dshulyak
Copy link
Contributor

peers for sync are prioritized based on observed latency and failure rate.

what we want to improve?

  • not all protocols are instrumented (only hs/1) to track latency
  • latency should be adjusted based on response size, difference protocol response can range from 1KB to 4MB of data
@dshulyak dshulyak self-assigned this Feb 24, 2024
spacemesh-bors bot pushed a commit that referenced this issue Feb 27, 2024
…ed on response size (#5601)

closes: #5265

previous implementation was incomplete and had two flaws. it will not account for the difference in response size, larger payloads will naturally take more time to complete. it would skew peer selection logic towards peers that are slower to respond.

the other flaw was to use only hs/1 protocol for measuing latency, often peers are blocked on ax/1 (where we get a collection of ids, which is large and slow) and lack of prioritization there may cause inefficient retries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
1 participant