Memecached cluster servers/client in container cluster such as k8s has the following characteristics.
Servers can be added or deleted at any time.
For client (App, Service) loadbalancing, the same client runs in the multiple containers.
To increase the client cache hit, it is recommended to use the same key/server Map.
Now xmemcached only supports index-based sorting of servers. Index-based sorting can not guarantee the same key/server map that works in multiple containers. To resolve the this issue, I added an address-based sorting method.
The modifications and additions are as follows.
Rename MemcachedSessionComparator to IndexMemcachedSessionComparator
Memecached cluster servers/client in container cluster such as k8s has the following characteristics.
Now xmemcached only supports index-based sorting of servers. Index-based sorting can not guarantee the same key/server map that works in multiple containers. To resolve the this issue, I added an address-based sorting method.
The modifications and additions are as follows.