Comments (11)
Do you have an idea about a possible solution, either to this project or to https://github.com/redis/hiredis?
from hiredis-cluster.
@wangfuqiang responded in you first question in #83
from hiredis-cluster.
The command_timeout in redisClusterContext does not copy to redisContext, redisSetTimeout which set the redisContext’ timeout in hircluster.c actully set nothing?
So add a call redisContextUpdateCommandTimeout before redisSetTimeout can fix this?
from hiredis-cluster.
@zjhua68 Have you seen this issue in the async api case only, or is it a generic problem?
from hiredis-cluster.
redisSetTimeout sets the socket options directly on the file descriptor using setsockopt (but only if the socket is in blocking mode). When we call redisReconnect, we call redisSetTimeout afterwards explicitly from hircluster so it should work even if the timeout is not stored in redisContext. Only if the socket is nonblocking, I can see a problem here that redisContextSetTimeout is never called. (Maybe there is a different handling for the nonblocking case?)
from hiredis-cluster.
rojec
hey, what's the diffirence betwwen hiredis-cluster
and hiredis ? now , we are using hiredis-cluster
from hiredis-cluster.
hiredis-cluster
is a client for Redis Cluster, where data is sharded across multiple Redis instances. It uses hiredis
under the hood and handles the calculation of which cluster instance to send the query to. hiredis-cluster
has a connection to each cluster node, which is provided by hiredis
.
If you don't have a Redis cluster running hiredis
will do.
from hiredis-cluster.
hiredis-cluster
is a client for Redis Cluster, where data is sharded across multiple Redis instances. It useshiredis
under the hood and handles the calculation of which cluster instance to send the query to.hiredis-cluster
has a connection to each cluster node, which is provided byhiredis
. If you don't have a Redis cluster runninghiredis
will do.
hey, our redis are running on cluster mode, Timeout issus is still not resolved, do u have any idea?
from hiredis-cluster.
See comment in #83
from hiredis-cluster.
I ran some tests myself in both hiredis and hiredis-cluster and the precision is not perfect.
Since hiredis-cluster rely on hiredis, and hiredis relies on a socket config, i.e the kernel, I'm not sure how we could improve this.
We are not running on a real-time system, so I would guess we couldn't get an exact precision.
I'm open to proposals or ideas how to improve it.
Here is the test results of configured timeout vs measured:
hiredis-cluster 0.8.0
Configured timeout vs result of 500 queries (Linux x86_64 5.4.0-122-generic):
Conf: Result:
1ms - Average: 8 ms Max: 12 ms Min: 6 ms
5ms - Average: 12 ms Max: 16 ms Min: 8 ms
10ms - Average: 16 ms Max: 20 ms Min: 14 ms
20ms - Average: 24 ms Max: 30 ms Min: 23 ms
50ms - Average: 56 ms Max: 60 ms Min: 52 ms
100ms - Average: 104 ms Max: 108 ms Min: 103 ms
500ms - Average: 511 ms Max: 516 ms Min: 507 ms
1s - Average: 1023 ms Max: 1028 ms Min: 1009 ms
Running similar tests using hiredis only gives similar results:
hiredis (on commit 06be7ff312a78f69237e5963cc7d24bc84104d3b)
Configured timeout vs result of 500 queries (Linux x86_64 5.4.0-122-generic):
Conf: Result:
1ms - Average: 7 ms Max: 17 ms Min: 6 ms
5ms - Average: 11 ms Max: 16 ms Min: 8 ms
10ms - Average: 15 ms Max: 20 ms Min: 14 ms
20ms - Average: 23 ms Max: 28 ms Min: 21 ms
50ms - Average: 55 ms Max: 60 ms Min: 54 ms
100ms - Average: 103 ms Max: 109 ms Min: 101 ms
500ms - Average: 511 ms Max: 517 ms Min: 507 ms
1s - Average: 1023 ms Max: 1031 ms Min: 1014 ms
from hiredis-cluster.
Duplicate of #83.
from hiredis-cluster.
Related Issues (20)
- During cmake, Checking for module 'glib-2.0' No package 'glib-2.0' found HOT 2
- nodeNext strange behaviour after master failover. HOT 9
- With redisClusterAsyncCommandArgvToNode api, client not discovering new nodes on redis master node disconnect HOT 4
- 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 2
- Crash while performing redisClusterAsyncFree() HOT 3
- memory leak HOT 1
- Cannot pass command with va_list to specific node HOT 2
- Keep init-nodes as fallback if all nodes fail
- Feature request for using hostname to move and connect to individual node in cluster mode HOT 6
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.