Redis Cluster deployment

Source: Internet
Author: User
Tags redis cluster

redis  is divided into two file formats:     1. Full data (RDB): Writes the In-memory data to the disk, making it easy to load the file the next time it is read.     2. Incremental request (AOF): is to serialize the in-memory data into an operation request for reading the file for replay to get the data. redis  storage is divided into memory storage, disk storage, and log file three parts. Server configuration: Number: 3 ip:10.200.134.6  10.200.134.8 10.200.134.34 ports: 3 ports Per server:6379 6380  6381cluster: Create 3 directories per server:cluster/6379  cluster/6380  cluster/6381yum install   ruby rubygems -ytar zxvf redis-3.0.5.tar.gzmv redis-3.0.5 /usr/local/redis  cd /usr/local/redismake malloc=libc && make install#redis-3.2.1.zip   Install the package in the attachment, download it yourself unzip redis-3.2.1.zip gem install redis-3.2.1.gem ln -s / usr/local/redis/src/redis-server /usr/bin/ln -s /usr/local/redis/src/redis-cli /usr/bin/ mkdir -pv /usr/local/redis/cluster/{6379,6380,6381}cp redis.conf cluster/6379/cp  redis.conf cluster/6380/cp redis.conf cluster/6381/#3台服务器修改6379 redis.conf configuration file under  6380 6381: daemonize yes# The remaining two redis.conf the lower port for 6380  and   6381 on it, the others are the same port 6379cluster-enabled yescluster-config-file nodes-6379.conf# 3 Server Boot Redisredis-server /usr/local/redis/cluster/6379/redis.conf redis-server /usr/local/redis /cluster/6380/redis.conf redis-server /usr/local/redis/cluster/6381/redis.conf # Create a cluster of any 1 servers redis-trib.rb create --replicas 1 10.200.134.6:6379 10.200.134.6:6380  10.200.134.6:6381 10.200.134.34:6379 10.200.134.34:6380 10.200.134.34:6381  10.200.134.8:6379 10.200.134.8:6380 10.200.134.8:6381>>> creating  clusterconnecting to node 10.200.134.6:6379: okconnecting to node  10.200.134.6:6380: okconnecting to node 10.200.134.6:6381: ok>>>  Performing hash slots allocation on 3 nodes ... Using 3 masters:10.200.134.6:637910.200.134.6:638010.200.134.6:6381......more>>> check for  open slots...>>> check slots coverage ... [Ok] all 16384 slots covered. #检查集群节点:/usr/local/redis/src/redis-trib.rb check  10.200.134.6:6379


Redis Cluster deployment

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.