Hi Willy.

On 2025-09-05 (Fr.) 16:47, Willy Tarreau wrote:
Hi all,

I've got a report of consistent hash delivering different hashes since 3.0 with
commit faa8c3e02 ("MEDIUM: lb-chash: Deterministic node hashes based on server
address").

The cause is a mistake in the ID-based key calculation (the hash is applied
twice and the ID range scaling was dropped). The fix is trivial:

   --- a/src/lb_chash.c
   +++ b/src/lb_chash.c
   @@ -123,7 +123,7 @@ static inline u32 chash_compute_server_key(struct server 
*s)
case SRV_HASH_KEY_ID:
           default:
   -               key = full_hash(s->puid);
   +               key = s->puid * SRV_EWGHT_RANGE;
                   break;
           }

For which directive/config can I grep to verify if the consistent hash is in 
use?

[snip]

Thanks for sharing your insights,
Willy
Regards
Aleks


Reply via email to