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

Consistent hashing: consistently retry another host #119

Merged
merged 4 commits into from
Dec 15, 2023

Commits on Dec 14, 2023

  1. Consistent hashing: consistently retry another host

    This implements a retry policy to consistently retry another host within the SRV
    set if we get a failure talking to the original host.
    
    We still use the original fallback strategy if this retry fails. (Should we?)
    philandstuff committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    bfca0de View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2023

  1. extract consistent hashing code

    This extracts the consistent hashing code into a new package and writes more
    tests for it.
    
    This removes a bunch of duplication from ConsistentHashingMode.
    
    As a consequence this jumbles the consistent hashing algorithm (because I've
    embedded the Key into a top-level CacheKey struct which includes Attempt for
    retry support). At this stage this is safe because nothing live is using it.
    philandstuff committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    d8cceb3 View commit details
    Browse the repository at this point in the history
  2. refactor

    rename method
    
    avoid implicit return
    
    remove unneeded conditional on m.DomainsToCache
    philandstuff committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    ca402a2 View commit details
    Browse the repository at this point in the history
  3. lint

    philandstuff committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    11fde0d View commit details
    Browse the repository at this point in the history