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

Support for AWS Elasticache Autodiscovery #37

Closed
marstonstudio opened this issue Oct 27, 2015 · 14 comments
Closed

Support for AWS Elasticache Autodiscovery #37

marstonstudio opened this issue Oct 27, 2015 · 14 comments
Assignees
Milestone

Comments

@marstonstudio
Copy link

Request to add support for AWS Autodiscovery to xmemcached
http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/AutoDiscovery.html

Amazon forked the spy client to provide and implementation of this functionality
awslabs/aws-elasticache-cluster-client-memcached-for-java@70bf764

But we have had recurring problems with Spy client and much prefer xmemcached

Only problem with xmemcached is that there is no builtin recovery mechanism if a node is replaced after the client has initialized. A new node will have the same URL but different IP address.

Any interest?

@killme2008
Copy link
Owner

It would be a great feature.
Give me some time to read the document and commit.
If it's not complicated, i will try to implement it ASAP,thanks.

2015-10-28 4:28 GMT+08:00 Jonathan Marston notifications@github.com:

Request to add support for AWS Autodiscovery to xmemcached

http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/AutoDiscovery.html

Amazon forked the spy client to provide and implementation of this
functionality
awslabs/aws-elasticache-cluster-client-memcached-for-java@70bf764
awslabs/aws-elasticache-cluster-client-memcached-for-java@70bf764

But we have had recurring problems with Spy client and much prefer
xmemcached

Only problem with xmemcached is that there is no builtin recovery
mechanism if a node is replaced after the client has initialized. A new
node will have the same URL but different IP address.

Any interest?


Reply to this email directly or view it on GitHub
#37.

庄晓丹
Email: killme2008@gmail.com xzhuang@avos.com
Site: http://fnil.net
Twitter: @killme2008

@flozano
Copy link

flozano commented Nov 11, 2015

+1 to this issue, it's a big problem when Amazon replaces a node

@flozano
Copy link

flozano commented Nov 13, 2015

Any update on this topic @killme2008 ? it seems we're seeing more node replacement by AWS these days and it's becoming a problem for us

@killme2008
Copy link
Owner

I am start working on it. But forgive me that i don't have much time on it.Try my best.

@killme2008
Copy link
Owner

hi,it's fixed in 2.1.0
#49

@flozano
Copy link

flozano commented Sep 28, 2016

Hi!

Thanks, but elasticache auto-discovery is not exactly the same as #49 (but #49 is totally needed to work properly with elasticache - thanks for that!)

Elasticache provides an auto-discovery api:
http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/AutoDiscovery.HowAutoDiscoveryWorks.html

This feature is very interesting when increasing or decreasing the cluster size dynamically.

@killme2008
Copy link
Owner

Sorry, my misunderstood.
It seems that i have to read the commit carefully.

awslabs/aws-elasticache-cluster-client-memcached-for-java@70bf764

I should resolve this issue in one week,very sorry so late to look into it.

@killme2008 killme2008 reopened this Sep 28, 2016
@killme2008 killme2008 added this to the 2.1.1 milestone Sep 28, 2016
@killme2008 killme2008 self-assigned this Sep 28, 2016
@flozano
Copy link

flozano commented Sep 28, 2016

No need to apologize, your work and your willingness to listen to users are greatly appreciated!

@killme2008
Copy link
Owner

@flozano I will release a beta version this weekend, maybe you want to try it.

It may has some bug especially when adding/replacing/removing nodes.

@killme2008
Copy link
Owner

killme2008 commented Nov 3, 2016

Released 2.2.1-beta

https://github.com/killme2008/xmemcached/releases/tag/xmemcached-2.2.1-beta

A simple example:

import java.net.InetSocketAddress;

import net.rubyeye.xmemcached.aws.AWSElasticCacheClient;
import net.rubyeye.xmemcached.aws.ClusterConfigration;
import net.rubyeye.xmemcached.command.BinaryCommandFactory;
import net.rubyeye.xmemcached.command.TextCommandFactory;


public class Test {
    public static void main(String args[]) throws Exception {
        AWSElasticCacheClient client =
        new AWSElasticCacheClient(new InetSocketAddress("AWS ElasticCache node host",
                                11211));
        ClusterConfigration conf = client.getConfig();
        System.out.println(conf.toString());
        client.set("a", 0, 1);
        System.out.println((Object)client.get("a"));
    }
}

@flozano Please test it and give me some feedback when you are free, thanks a lot.

@killme2008
Copy link
Owner

@marstonstudio

Have you test it? Feedback welcome!

@marstonstudio
Copy link
Author

Working in our production environment now.

@killme2008
Copy link
Owner

@marstonstudio Thanks, i will release new version this weekend.

@killme2008 killme2008 modified the milestones: 2.3.0, 2.2.0 Feb 28, 2017
@killme2008
Copy link
Owner

Released 2.3.0, but it may take sometime to be synchronized to maven central repository.

https://github.com/killme2008/xmemcached/releases/tag/xmemcached-2.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants