We use memcached in Java. Our environment runs on OpenShift Online (PaaS) and we have currently one "gear" running our backend java application and one "gear" running memcached.
Since it would be cheaper, we like to migrate to AWS ElastiCache - but without changing our current memcached client, which is xmemcached. But how do we have to deal with the authentication? I tried [Access Key ID] / [Secret Access Key]:
MemcachedClient memcachedClient;
MemcachedClientBuilder builder = new XMemcachedClientBuilder(AddrUtil.getAddresses([aws node endpoint]));
builder.setCommandFactory(new BinaryCommandFactory());
builder.addAuthInfo(AddrUtil.getOneAddress([aws node endpoint]), AuthInfo.plain([Access Key ID], [Secret Access Key]));
memcachedClient = builder.build();
No success. I get always an exception:
net.rubyeye.xmemcached.exception.MemcachedException: There is no available connection at this moment
The same exception I get, if I do no authentication at all.
I know that it would be bether to use the AWS client; but since we actually use only one node, we do not need auto discovery. The point is that we do have some other memcached servers e.g. in the testing / local environment, which are probably not supported by the aws client (or am I wrong?).