stevenkang / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

Failover can't work when memcached hosting server suddenly poweroff or reboot #180

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Spy version: 2.5 and 2.6
OS: CentOS linux 2.6.9-67.ELsmp x64
JDK: 1.6.0_21-b06

I used spy driver's Redistribute Failure mode as my memcached cluster failover 
mechanism.  Normally it works on windows and linux. 
For example I kill one memcached process in one node, then very fast spy will 
redirect the continuous request to another node.
But I found that if I power off one memcached node or reboot one memcached 
node, 
then the failover can't work as just kill memcached process.
In Windows, it will speed about 20s to failover. 
More worse, in Linux failover mechanism can't work, the continuous request 
still try to request the shutdown memcached node, until the client crash.
I really can’t figure it out. Anybody know the answer.

Here is the ConnectionFactory params:
getFailureMode:Redistribute
getMaxReconnectDelay:30
getOperationTimeout:1000
getOpQueueMaxBlockTime:10000
getTimeoutExceptionThreshold:998

Original issue reported on code.google.com by harrywu...@gmail.com on 9 Jun 2011 at 9:23

GoogleCodeExporter commented 9 years ago
The same in #181

Original comment by bouri...@gmail.com on 16 Jun 2011 at 6:08

GoogleCodeExporter commented 9 years ago
In 2.7, the continuous timeout has been moved down to the node level, so you 
would have faster, more reliable detection of a node that goes down without 
sending a TCP FIN/RST.  

If you need a faster failover in 2.6, you can lower the threshold for the 
continuous timeout by initializing the client with a connection factory builder.

The continuous timeout feature was added to deal with this specific situation.  
Can you see if that addresses your needs?

Original comment by ingen...@gmail.com on 23 Jun 2011 at 5:53

GoogleCodeExporter commented 9 years ago
Well done!!! Ingenthr
With 2.7, now it work for me. Thanks a lot for your team.

Original comment by harrywu...@gmail.com on 24 Jun 2011 at 7:55