redis-trib | A simple Docker image for running redis-trib | Continuous Deployment library
kandi X-RAY | redis-trib Summary
kandi X-RAY | redis-trib Summary
A simple Docker image for running redis-trib
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of redis-trib
redis-trib Key Features
redis-trib Examples and Code Snippets
Community Discussions
Trending Discussions on redis-trib
QUESTION
I am trying to connect a cluster of 8 replicas on one address to an existing cluster on another address.
The replica servers are all running in cluster mode.
When I try to do either:
./redis-trib.rb add-node --slave REPLICA_IP:6380 MASTER_IP:6380
or
./redis-cli --cluster add-node REPLICA_IP:6380 MASTER_IP:6380 --cluster-slave
I get the same result;
Waiting for the cluster to join...........................
which hangs indefinitely.
The two servers can definitely see each other and I can connect to any relevant redis-node (replica or master) from either server. The discovery/communion ports (16830, etc.) are all open and contactable as well. The output of these commands also suggests that the cluster has been found as it shows each of the nodes and their correct node ids.
here is the full output of either add-node command:
...ANSWER
Answered 2018-Nov-09 at 00:01I figured it out:
Using tcpdump I confirmed that both servers were talking to each other on both the redis server ports and the handshake ports repeatedly while the add-slave command hung forever.
but in the redis configs for each node I had:
bind 0.0.0.0
but on both the masters and the replicas the config must read:
bind SERVER_IP
in order for CLUSTER MEET to work properly.
QUESTION
I'm trying to execute the redis-trib.rb
utility (used to configure redis clusters) on the salt orchestrator, after executing salt states on multiple minions to bring up redis processes.
Reading the salt documentation it looks like the the orchestrate runner does what I want to execute the minion states.
Indeed this snippet functions perfectly when executed with sudo salt-run state.orchestrate orch.redis_cluster
:
ANSWER
Answered 2018-Apr-25 at 14:15The problem is, that you are passing fun
et. al. to the runner instead of the execution module. Also note that you have to pass the arguments via arg
and not args
:
QUESTION
ANSWER
Answered 2018-Jul-15 at 21:32Ok so I figured it out. I needed to
- set my cluster-announce-ip to the Ethernet adapter that has been created when installing docker (open up a terminal and do ipconfig)
- update
redis-trib.rb
to reflect this IP - map the 16379 port when the docker image is created
QUESTION
When I reshard redis cluster, I meet a problem.
The redis cluster information and problem detail show as below:
ANSWER
Answered 2018-Jan-19 at 08:39Try:
QUESTION
When connecting to a redis cluster with ioredis (https://github.com/luin/ioredis) you only need to specify one node e.g. with a three node cluster
127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002
You can connect using simply:
...ANSWER
Answered 2017-Oct-05 at 13:16When connecting to a cluster, ioredis will ask the :7000 for the node list of the cluster, and after that ioredis is able to discover the new node and handle the failover. So, the answer is yes if the :7000 dies after the node list being fetched.
QUESTION
I created a redis cluster with three nodes:
...ANSWER
Answered 2017-Sep-26 at 12:38AFAIK no - hash slots' "fragmentation" is negligible in terms of any meaningful overheads. Some intuition:
- Small range (16K)
- Resharding isn't a frequent operation
- Internally, Redis uses bitmaps to manage the slot mapping, so regardless of the actual slots' distribution accessing these bitmaps is done in constant time.
QUESTION
I have a Redis cluster with 3 masters. I am not interested in data persistence since this is a caching solution. I am running v3.2 on Windows. When I stop one of the servers manually to see if I can still access the db, I get 'CLUSTERDOWN The cluster is down error'. And even to do that, I have to connect to one of the instances that is still working. I don't see how this is a solution for high availability. I hope that I am missing something. Any ideas why I can't access the cluster when one of the nodes is down? Thank you.
Cluster create command:ruby.exe redis-trib.rb create 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002
...ANSWER
Answered 2017-Aug-23 at 04:21As you said that you're using 3 master nodes within Redis Cluster, so it is clearly visible that if one of node will down then you'll get CLUSTERDOWN
errors.
To avoid these type of errors and get high availability, its better to have slaves attached to those of your master nodes(as shown in official Redis Cluster tutorial here).
There's a reason to have slave attached with your master to get higher availability. For that you can read these lines mentioned in above Redis cluster tutorial link.
There are 16384 hash slots in Redis Cluster, and to compute what is the hash slot of a given key, we simply take the CRC16 of the key modulo 16384.
Every node in a Redis Cluster is responsible for a subset of the hash slots, so for example you have a cluster with 3 nodes, where:
1) Node A contains hash slots from 0 to 5500.
2) Node B contains hash slots from 5501 to 11000.
3) Node C contains hash slots from 11001 to 16383.
So whenever you used to SET
a Key in Redis cluster, it calculates its hash slot value for that key and save key accordingly in one of node.
This is the reason it is mandatory to have all of nodes(At least master or its one slave) to be active in Redis Cluster.
Rest if you'll attach at least 1 slave with every master node into your Redis Cluster, you'll get better Redis Cluster availability. After attaching slaves with your master node, you can test your setup for higher availability by closing any of master node manually.
QUESTION
What does the "trib" in the redis-trib utility stand for?
...ANSWER
Answered 2017-Feb-10 at 01:33I think the programmer was having a bit of fun with that name and meant it to mean Redistribute.
From the page https://redis.io/topics/cluster-tutorial
... the Redis Cluster command line utility called redis-trib, a Ruby program executing special commands on instances in order to create new clusters, check or reshard an existing cluster, and so forth.
Since a cluster is sometimes called "distributed computing", the program deals entirely with cluster creation and maintenance, and there is no formal explanation of the name; I believe this to be what the programmer was trying to hint at.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install redis-trib
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page