redis-cluster

Redis pub sub max subscribers and publishers

纵饮孤独 提交于 2020-06-17 01:55:41
问题 Could anyone tell me whats the maximum number of concurrent channels Redis pub-sub can support?. Is there any cap to the number of subscribers and publishers 回答1: Redis uses a dict , same struct as for keys, to store channel subscriptions, both per client and for all clients (keeps a per-subscription hash with a list of clients subscribed), so it is up to 2^32 channel subscriptions in total. It uses a list to store pattern subscriptions per client, so it is theoretically limited only by the

Now that Redis Cluster comes with sharding, replication and automatic failover, do i still need to use Sentinel for failover handling?

ε祈祈猫儿з 提交于 2020-01-17 06:40:11
问题 Now that Redis Cluster comes with sharding, replication and automatic failover, do i still need to use Sentinel for failover handling ? 回答1: No. Sentinel is for managing the availability and providing service discovery when using Redis in single instance mode (single-master/one-or-more-slaves). When using Redis in cluster mode, Sentinel isn't needed. 来源: https://stackoverflow.com/questions/44361898/now-that-redis-cluster-comes-with-sharding-replication-and-automatic-failover

AWS Redis Cluster - MOVE error

陌路散爱 提交于 2020-01-06 06:56:11
问题 I try to execute a hmset command on AWS Redis Cluster, and I'm getting the following "moved" error. Not sure what is going on. MOVED 7652 10.0.4.210:6379 from rediscluster import StrictRedisCluster startup_nodes = [{"host": self.host, "port": self.port}] client = StrictRedisCluster(startup_nodes=startup_nodes, decode_responses=True, skip_full_coverage_check=True) client.hmset('my_key', {'abc':'123'}) 回答1: As your data is sharded and distributed into different nodes in the cluster, you should

Using StackExchange.Redis client with Redis cluster

淺唱寂寞╮ 提交于 2019-12-23 14:11:11
问题 How do I tell StackExchange.Redis (v1.0.481) that it's about to connect to a Redis cluster (v3.2.6, in case it matters), and not just a standalone/replicated instance? When I use the redis-cli for example, I have to pass a -c flag to make it cluster-aware. Is there an equivalent flag in the StackExchange.Redis connection string? I've searched for and come across several examples of connection strings that include multiple comma-separated host:port parameters, but nothing that explicitly makes

How to have both clustered and non-clustered redis connections in laravel

只谈情不闲聊 提交于 2019-12-23 09:36:21
问题 Background In the past I was able to use a non-clustered redis just fine in my config like so: 'redis' => [ 'default' => [ 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), 'port' => 6379, 'database' => 0, 'cluster' => true, ] ], However due to the load on our redis servers, I have to cluster my redis, This config works fine when the only redis connection I have is clustered (figured it out after a lot of work): 'redis' => [ 'client' => 'predis', 'cluster' =

How to resume hash slots of a particular node in redis cluster in case of hard failure?

青春壹個敷衍的年華 提交于 2019-12-23 03:47:13
问题 So I am testing out the redis cluster. I have a setup with 3 masters and 3 slaves. Now, in case a node faces hard-failure (both master and slave go down), the cluster is still functional, barring the hash slots served by the failed node. Now, while testing such a scenario, I see that reads/writes that operate on keys served by these hash slots fail with exceptions, which is fine (I'm using jedis btw). However, if I am using redis cluster as a cache, I would like these hash slots to be served

Using jedis how to write to a specific slot/node in redis cluster

此生再无相见时 提交于 2019-12-22 18:13:34
问题 I'm trying to improve the performance of writing data to redis cluster. We are planning to move from redi-sentinel to cluster mode for scalability. But, the performance of write operations is very less compared to redis-sentinel. We leveraged pipeline in redis-sentinel but cluster mode doesn't support pipeline. So, I was thinking to group all the keys that go to a same node and send the batch to that specific node using pipeline. So, I'm wondering how to know/compute (before writing to

Getting a connection error when using redis-trib.rb to create a cluster?

99封情书 提交于 2019-12-22 00:28:34
问题 I have all my Redis servers configured like this: Masters: 192.168.0.106:7001, 192.168.0.105.7001, 192.168.0.112:7001 Slaves: 192.168.0.106:7002, 192.168.0.105:7002, 192.168.0.122:7002 Where the 192.168.0.106:7002 server is a slave of the 192.168.0.106:7001 server and so on. I have all servers up ana running and can do redis-cli to all of them. I can see the 17001 and 17002 ports open too. But when I run: ./redis-trib.rb create --replicas 1 192.168.0.106:7001 192.168.0.105:7001 192.168.0.112

Connect to ElastiCache cluster via Node.js

大憨熊 提交于 2019-12-12 08:54:06
问题 I'm confused as to how to connect to AWS's ElastiCache Redis via Node.js. I've successfully managed to connect to the primary host (001) via the node_redis NPM, but I'm unable to use the clustering ability of ioredis because apparently ElastiCache doesn't implement the CLUSTER commands. I figured that there must be another way, but the AWS SDK for Node only has commands for managing ElastiCache, not for actually connecting to it. Without using CLUSTER, I'm concerned that my app won't be able

is redis command still atomic in redis cluster environment?

◇◆丶佛笑我妖孽 提交于 2019-12-12 05:14:34
问题 i know incr command is atomic in a or more redis server,but other command e.g. set command、Hset command that are still atomic in redis cluster environment 回答1: For those commands supported by cluster mode, they are atomic. However, some commands are limited supported by cluster mode, e.g. commands that take multiple keys. For example, you can run SADD atomically in cluster mode, but you cannot run SUNION , unless all keys are mapped to the same hash slot. Also hash tag can help us map keys to