Add rendezvous hash URI scorer #268
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 expectation1/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