I'm using elasticache for my cache hosts and selected xmemcached for the ability to add and remove servers on the fly.
I'm using this, but when I take cache servers down, I'm seeing sessions fail, and then lots of retries for a few min after, and sporadically after that. Q1: Just making sure sessions for dead hosts will eventually get cleaned up properly.
Also, since I've written code to sync Xmemcached servers with elasticache servers, I have need to check on what hosts XMemcached knows about. Q2: The way I'm doing this now is by combining the results of getAvailableServers getReconnectRequestQueue. Is there a better place to get a list of all servers which have ever been added to the client? Is it necessary to remove the servers, or will XMemcached eventually 'forget' about servers that have been down a long time?
(Note, which elasticache and periodically refreshing the Xmemcached host list, the memcached host will actually go away prior to me telling the XMemcached client to remove the server)
Here's the session failures I see:
Jan 22, 2012 7:33:10 AM net.rubyeye.xmemcached.impl.MemcachedConnector$InnerControllerStateListener onException
SEVERE: Exception occured in controller
at net.rubyeye.xmemcached.impl.MemcachedConnector.onConnect(MemcachedConnector.java:402)
at com.google.code.yanf4j.nio.impl.Reactor.dispatchEvent(Reactor.java:302)
at com.google.code.yanf4j.nio.impl.Reactor.run(Reactor.java:141)
Jan 22, 2012 7:33:10 AM com.google.code.yanf4j.nio.impl.Reactor dispatchEvent
SEVERE: Reactor dispatch events error
at net.rubyeye.xmemcached.impl.MemcachedConnector.onConnect(MemcachedConnector.java:402)
at com.google.code.yanf4j.nio.impl.Reactor.dispatchEvent(Reactor.java:302)
at com.google.code.yanf4j.nio.impl.Reactor.run(Reactor.java:141)
Jan 22, 2012 7:33:10 AM net.rubyeye.xmemcached.impl.MemcachedConnector$SessionMonitor rescheduleConnectRequest