twitter / twemproxy

A fast, light-weight proxy for memcached and redis
Apache License 2.0
12.13k stars 2.06k forks source link

A question about the 'distribution' parameter #578

Open ghost opened 5 years ago

ghost commented 5 years ago

Hey

This is not an issue but a question about the 'distribution' parameter.

I know that the 'hash' parameter is used to configure a hash function for sharding. But what the 'distribution' parameter for?

Can you please explain it to me? I have tried to find any documentation or something like that about the twemproxy but found nothing.

TysonAndre commented 3 years ago

The hash is computed for the memcache/redis key of a command, and the distribution algorithm uses the hash to choose a backend server in that pool