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

feat: extend dynamic latency-based routing strategy with k-top-nodes option #635

Merged

Conversation

nikolay-komarevskiy
Copy link
Contributor

@nikolay-komarevskiy nikolay-komarevskiy commented Feb 18, 2025

Description

Existing dynamic latency-based routing strategy is modified to accept an optional argument k_top_nodes.
Once set, requests are routed to only k nodes with the highest rank (score based on latencies and availabilities measurements). The requests distribution to these k nodes is (as previously) based on the weighted random sampling algorithm, where nodes with higher score are chosen more frequently.

How Has This Been Tested?

Unit tests have been adjusted.

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@nikolay-komarevskiy nikolay-komarevskiy force-pushed the komarevskiy/latency-routing-k-top-nodes branch 3 times, most recently from 75230ea to 67281a0 Compare February 18, 2025 13:15
@nikolay-komarevskiy nikolay-komarevskiy force-pushed the komarevskiy/latency-routing-k-top-nodes branch from 543a6d6 to 4d421b5 Compare February 21, 2025 14:35
@nikolay-komarevskiy nikolay-komarevskiy force-pushed the komarevskiy/latency-routing-k-top-nodes branch from d3a9977 to 4e6f2d9 Compare February 24, 2025 09:27
@nikolay-komarevskiy nikolay-komarevskiy marked this pull request as ready for review February 24, 2025 09:48
@nikolay-komarevskiy nikolay-komarevskiy requested a review from a team as a code owner February 24, 2025 09:48
@sesi200 sesi200 merged commit 6a10ba7 into dfinity:main Feb 26, 2025
27 checks passed
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

Successfully merging this pull request may close these issues.

3 participants