Questions tagged [redis-cluster]

Redis Cluster provides a way to run a Redis installation where data is automatically sharded across multiple Redis nodes.

Redis Cluster provides a way to run a Redis installation where data is automatically sharded across multiple Redis nodes.

Redis Cluster also provides some degree of availability during partitions, that is in practical terms the ability to continue the operations when some nodes fail or are not able to communicate. However the cluster stops to operate in the event of larger failures (for example when the majority of masters are unavailable).

So in practical terms, what you get with Redis Cluster?

  • The ability to automatically split your dataset among multiple nodes.

  • The ability to continue operations when a subset of the nodes are experiencing failures or are unable to communicate with the rest of the cluster.

Refer:

http://redis.io/topics/cluster-tutorial

694 questions
3
votes
0 answers

node.js and redis cluster: handling disconnections

TL;DR Using ioredis with a redis cluster, what is the correct way to get an error if redis becomes unreachable, and then try to reconnect? More details: I'm using ioredis to connect to a redis cluster from node.js and trying to create a reasonably…
joniba
  • 3,339
  • 4
  • 35
  • 49
3
votes
1 answer

how to make sure counter atomic by using redis incr command

I'm using redis incr as our request counter as I researched incr is a atomic and thread-safe, now I wanna add expire time for each key but seems this process is not thread-safe, for example, redis crash only after incr done and before Expire command…
Frank
  • 977
  • 3
  • 14
  • 35
3
votes
1 answer

Redis cluster & auto-discovery

Although very vague, Redis documentation states that it has auto-discovery. In what consists that auto-discovery? If I create a cluster of 6 nodes in host A, is it possible to simply start a server on another host B and get it auto discovered and…
3
votes
0 answers

Can I use redis cache free edition in production for basic usages?

I have a web application where I need to implement caching. I found Redis cache is open source and free to download. But I have also found it's limited for 15 days and after this limit I wont be able to change any configuration. While I need pretty…
robert
  • 69
  • 5
3
votes
1 answer

What is the difference between:Redis Replicated setup, Redis Cluster setup Redis Sentinel setup and Redis with Master with Slave only?[REDISSON]

I've read https://github.com/redisson/redisson And I found out that there are several Redis Replicated setup (including support of AWS ElastiCache and Azure Redis Cache) Redis Cluster setup (including support of AWS ElastiCache Cluster and Azure…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
3
votes
1 answer

Golang Redis Sentinel client

I'm adding Redis support to an open-source project written in Go. The goal is to support all Redis topologies: server, cluster, sentinel. I browsed Go clients listed in redis.io/clients, and it seems that github.com/go-redis/redis project is a…
dmitsh
  • 31
  • 1
  • 4
3
votes
1 answer

Redis eviction policy clarification

I'm new to Redis and could not find any information on that online so asking it here. Suppose I have multiple database Redis cluster and I'm using LRU/LFU eviction policy. I wonder if Redis eviction policy is database based? What I mean is, suppose…
Evgeny
  • 415
  • 4
  • 17
3
votes
0 answers

Unable to copy data from one redis server to another

I have redis db in stage whose data I want to copy in dev server. I tried copying data using SLAVEOF command as well as SAVE command. Both stage and dev are clustered redis servers. Both commands are giving errors: SLAVEOF: # running in dev…
3
votes
3 answers

How to delete all keys from redis cluster

I want to delete all keys from redis cluster by using fast process. I know how to delete the keys by using "redis-cli FLUSHALL". But this command can be slow when the data set is large. I heard that all keys can be cleared from redis cache by…
3
votes
1 answer

Time Complexity of Redis sorted set insertion

The time complexity of Redis sorted set insertion is O(log n) and I assume it is due to the insertion of data in the skip list (In order to maintain the Set Order). But if the data that I am going to insert will always have scores in increasing…
Aravind
  • 163
  • 2
  • 13
3
votes
1 answer

Connecting to Redis cluster (in Docker) with Python

I'm setting up a highly available Redis cluster (with Sentinels), and need to write data to it in Python. However, I don't know which hostname to use when connecting from Python, and I am also receiving "Connection refused". My Dockerfile: FROM…
user11992940
3
votes
0 answers

How does Redis cluster relate to db's index?

The code below is written in Go, but the problem itself relates to Redis. Previously our code looked like the following: c := redis.NewClient( &redis.Options{ Addr: addr, Password: pass, DB: db, }, ) But it was…
being of habits
  • 317
  • 2
  • 11
3
votes
1 answer

Read directly from a replica inside Redis cluster

I want to read directly from a replica inside a Redis cluster but I am getting redirected even if the key actually exist inside the Redis node. Checked READONLY command docs. However, that is seemed to be ignored in case of Redis Cluster. How…
tugberk
  • 57,477
  • 67
  • 243
  • 335
3
votes
0 answers

Spring boot always try to reconnect the failed node in Redis cluster enviroment

I have a redis cluster with 3 shards. Each shard has 2 nodes, 1 primary and 1 replica. I'm using spring-boot 2.0.1. Final and following is the configuration and code im using to create redis cluster connect. pom.xml:
Kaol
  • 431
  • 2
  • 7
  • 16
3
votes
1 answer

Reading entire data from Redis / Golang client

I have a Redis deployment acting as a caching layer. The cache is not very big and we would like to read all the items (key/values) at once from our Golang program. The only solution I found is to iterate through all master servers (it is a Redis…
OCDev
  • 655
  • 1
  • 7
  • 21