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

Add rendezvous hash URI scorer #268

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open

Conversation

advayakrishna
Copy link
Contributor

@advayakrishna advayakrishna commented Mar 9, 2022

Before this PR

Adds a new URI scoring mechanism based on rendezvous hashing:
https://en.wikipedia.org/wiki/Rendezvous_hashing

At initialization, clients can specify a header value used to generate an ordering on the URIs - this means that clients can take advantage of server-side read or write locality by sending requests for identical keys to the same URI in the average case. If there are n URIs and one changes, in expectation 1/n requests would be sent to a different node. It is important that clients do not rely on this routing behavior for correctness as requests may be retried at any of the URIs in the case of errors.

After this PR

==COMMIT_MSG==
Add rendezvous hash URI scorer to deterministically balance requests across URIs
==COMMIT_MSG==

Possible downsides?


This change is Reviewable

@changelog-app
Copy link

changelog-app bot commented Mar 9, 2022

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Add rendezvous hash URI scorer to deterministically balance requests across URIs

Check the box to generate changelog(s)

  • Generate changelog entry

@stale
Copy link

stale bot commented Apr 16, 2022

This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days.

@stale stale bot added the stale label Apr 16, 2022
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.

4 participants