• Poul-Henning Kamp's avatar
    Make the random/hash/client director use a stable hash. · 0352ea25
    Poul-Henning Kamp authored
    If the chosen backend is sick or fails to give us a connection,
    we rescale the keys position in the backends window onto the
    all the remaining backends.
    
    The upside of this is that we get a stable and predicatable
    hash distribution.
    
    The downside of this is that you are very unlikely to spot the
    healthy .weight=1 backend between two .weight=100 sick ones before
    your retries run out.
    
    Inspired by: patch from WaveCDN
    0352ea25
cache_dir_random.c 7.13 KB