Comments (4)
But we definitely want it to perform a rediscovery so that it recovers and starts sending the command to a valid node present in the cluster.
Sounds reasonable. I'll look into it..unless you are preparing a PR already?
from hiredis-cluster.
Thanks, please go ahead @bjosv :)
from hiredis-cluster.
Ah..
The ..ToNode()
were introduced as a low level API primarily to be able to send commands that are not slot bound,
and this was the reason for not performing retires and redirect as stated in the README. Are you sending commands without keys in your case?
I have seen usage of cluster_update_route()
to manually handle cluster rediscovery in this case, but maybe it's not perfect..not after the recent changes which introduces async slotmap updates.
Would you need to have the command resent, or would it be enough if hiredis-cluster internally triggers a rediscovery so that the slotmap gets updated for future commands?
I guess resending commands might be a problem since we are not really sure if the redis server has handled the command or not. It depends on error and what command is sent, e.g. we don't want to resend a INCR
command for example.
from hiredis-cluster.
Hi @bjosv Thanks for the detail.
We have a use case where we are relying on the ..ToNode()
api to send the same command to all the master nodes that are present in the cluster combine the responses from individual nodes and sent back the response to application.
So, we invoke an initNodeIterator()
to get the iterator begin, followed by redisClusterAsyncCommandArgvToNode()
for the iterator object, till iterator becomes invalid in a while loop.
The issue we are facing is that, as soon a redis master server node is deleted, it still attempts to send the command to the stale IP and gives back timeout response. So, we are never able to respond back with success to the application.
Are you sending commands without keys in your case?
The command has keys in it, and the command structure is similar to how we pass data to redisClusterAsyncCommandArgv()
api.
Would you need to have the command resent, or would it be enough if hiredis-cluster internally triggers a rediscovery so that the slotmap gets updated for future commands?
Since the master node has gone down, I guess it's fine to see 1 or 2 timeout responses since the hiredis nodes table takes a while to get updated. But we definitely want it to perform a rediscovery so that it recovers and starts sending the command to a valid node present in the cluster. Making it as closer to redisClusterAsyncCommandArgv()
behaviour would be ideal I would say since end user need not worry of handling the command/response differently in both cases.
from hiredis-cluster.
Related Issues (20)
- Does hiredis-cluster support SSUBSCRIBE? HOT 2
- Compilation error LIBEVENT_INCLUDES-NOTFOUND HOT 3
- MOVED ERROR in pipeline-API when increasing shards in existing redis cluster HOT 10
- Target "hiredis::hiredis" because target "hiredis" is not a library HOT 1
- During cmake, Checking for module 'glib-2.0' No package 'glib-2.0' found HOT 2
- nodeNext strange behaviour after master failover. HOT 9
- Update the slotmap after send errors/timeouts in the sync API HOT 1
- hircluster.c:218:9: 错误: HOT 4
- Failed to find keys of command XREADGROUP HOT 2
- Recovery in case of discovered slots from redis cluster is partial HOT 2
- is redisClusterAppendCommand, redisClusterGetReply thread Safe? HOT 1
- SIGSEGV in clusterNodesReplyCallback while calling redisClusterAsyncFree HOT 3
- The connection always been close after every redisClusterCommandArgv HOT 1
- Unable to execute commands without keys (FLUSHALL, PING, INFO) HOT 2
- redisClusterAsyncDisconnect behaviour when a redisAsyncContext object has seen some error HOT 1
- symbol lookup error: /usr/local/lib/libhiredis_cluster.so.0.13: undefined symbol: hiredisAllocFns HOT 4
- Does hiredis-cluster support SCAN HOT 1
- Event loop occasionally hangs after redisClusterAsyncDisconnect under high connection error conditions HOT 1
- Crash while performing redisClusterAsyncFree() HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hiredis-cluster.