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

Add AddressMemcachedSessionComparator #99

Merged
merged 1 commit into from
Mar 25, 2019
Merged

Add AddressMemcachedSessionComparator #99

merged 1 commit into from
Mar 25, 2019

Conversation

ssup2
Copy link

@ssup2 ssup2 commented Mar 16, 2019

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
  • Add MemcachedSessionComparator Interface
  • Add AddressMemcachedSessionComparator

@ssup2
Copy link
Author

ssup2 commented Mar 18, 2019

is there no feedback??

tags Outdated Show resolved Hide resolved
* Renamve MemcachedSessionComparator to IndexMemcachedSessionComparator
* Add MemcachedSessionComparator Interface
* Add AddressMemcachedSessionComparator
@killme2008 killme2008 merged commit 6615091 into killme2008:master Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants