Discover redis cluster kubernetes, include the articles, news, trends, analysis and practical advice about redis cluster kubernetes on alibabacloud.com
Note: The original text is transferred from 73715947, only as a convenient referenceA required software: Redis, Ruby language runtime, Redis's Ruby driver Redis-xxxx.gem, and the tools to create a Redis cluster redis-trib.rbTwo-installation configuration RedisRedis https://g
Operating Environment: CentOS 7 (Version number: 1503)Redis version: 3.0.5Reference Document: ①http://www.redis.cn/topics/cluster-tutorial.html②http://www.linuxidc.com/linux/2015-08/121845.htmNote: A Redis cluster requires at least 6 nodes, or six servers. If the number of servers is insufficient to establish multiple
Gradual, from easy to difficult, so that more fun. Overview
This article began to continue on the basis of the content, this article mainly introduces Spring-session implementation configuration using Redis cluster, there will be two ways to configure, one is Redis-cluster, one is
#1, redis-cli command into the cluster environmentRedis-cli-c-P 7000#2, view the status of the entire Redis cluster, see who is the master, who is from, and often in two ways.#2.1, through redis-trib.rb check method,./REDIS-TRIB.R
I am a rookie, just graduated not long ago, in a company in Shanghai, the company has counted I have 3 Java programmers, the other two have two work experience, they are responsible for app interface development, I am a person responsible for the background management interface development, the company project Framework is built with spring, The development tools are also spring, the persistence layer integrates spring data jap and mybatis, the control layer is spring MVC, and for me just out of
First, the environmentUbuntu 14.04 LTS, Redis 3.0.2Second, Redis cluster construction (single-machine test)1, the installation of Rediswget http://download.redis.io/releases/redis-3.0.2.tar.gztar zxvf redis- 3.0. 2. Tar . GZCD Redis
-Slave simultaneous down Machine Condition:
1. Non-planned, not to be considered, generally there is no such problem
2., scheduled restart, restart before restarting through the operation to save the DUMP main library data, need to note the order:
1. Close all Redis on one of the machines, master all cut to another machine (multi-instance deployment, one machine with both master and slave), and shut down the machine
2. Then dump the Lo
'unknown 'on event FF00FF eof 0 done 0 rb 0 sb 0: Connection reset by pee[Mon Jul 28 10:57:35 2014] nc_proxy.c: 336 accepted c 9 on p 8 from 'unknown'[Mon Jul 28 10:57:35 2014] nc_core.c: 201 close c 9 'unknown 'on event FF00FF eof 0 done 0 rb 0 sb 0: Connection reset by peer
The above is the error message after twemproxy is started. If you also use keepalived as the frontend LVS distribution function, it is estimated that the result will not be better than me.
Solution:
Stop using keepalived
REDIS-TRIB.RB is a REDIS cluster management tool implemented with Ruby. Internally through cluster related commands to simplify the common operations of cluster creation, inspection, slot migration and equalization
1.ruby Installation
Download Address: wget https://cach
Real_server 192.168.33.11 6379 {
Weight 1, 100
Notify_down/data/sh/redis. sh
TCP_CHECK {
Connect_timeout10
Nb_get_retry3
Delay_before_retry3
Connect_port6379
}
}
}
4. Create a switchover script:
Create the/data/sh/redis. sh script on the master and slave databases. The content is:
/Etc/init. d/keepalived stop
Restart the keepalived service on the two Redis datab
One, Redis clusterThe Redis cluster implementation is a built-in data auto-sharding mechanism that maps all keys into 16,384 slots within the cluster, and each Redis instance in the cluster is responsible for reading and writing t
Configuring the Machine 1
In the demo, 172.16.179.130 is the IP of the current Ubuntu machine
In 172.16.179.130? Desktop record, create CONF record
In conf, create a 7000.conf, edit the content as followsport 7000bind 172.16.179.130daemonize yespidfile 7000.pidcluster-enabled yescluster-config-file 7000_node.confcluster-node-timeout 15000appendonly yes
In conf, create a 7001.conf, edit the content as followsport 7001bind 172.16.179.130daemonize yespidfile 7001.pidcluster-ena
After the cluster is set up, it is necessary to add a node for capacity expansion. Then copy a 7006, instead of the corresponding redis.conf (copy the change port is good, if the copy of Redis belongs to the cluster before, you need to put the associated node.conf, such as remove)[[Email protected]7006]# vim redis.conf [[email protected]7006]# src/
1. Install Redis, execute command Brew install Redis2. After the installation is complete, brew info Redis can view the installation path of Redis3.cd /usr/local/cellar/redis/3.0.7 entering the Redis installation path4. Create a cluster/7001,7002,7003 directory under/USR/LOC
Redis cluster. Many tutorials on the web, just follow its steps to do only on a single run, it is not a bit resistant. and no password verification.Begin:1:redis cluster requires a minimum of 6 server-side, so first 6 virtual machines I use centOS-7 mini each to give a minimum of memoryIP fixed to: 200, 201, 202, 203,
-Slave simultaneous down Machine Condition:
1. Non-planned, not to be considered, generally there is no such problem
2., scheduled restart, restart before restarting through the operation to save the DUMP main library data, need to note the order:
1. Close all Redis on one of the machines, master all cut to another machine (multi-instance deployment, one machine with both master and slave), and shut down the machine
2. Then dump the Lo
Open the computer today, connect Redis, found that the connection is not on ...
The reason is that the host could not be found ... View virtual machine IP, discover IP changed ...
So the thought of configuring a Redis cluster before, the IP address of BIND as a virtual machine is configured in redis.conf, it should be this reason, so the repair
Configure bind:1
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.