
redis
redis
数据库人生
专注于数据库
PostgreSQL;Oracle 11G OCA、OCP;OceanBase V2 OBCA、OBCP
展开
-
redis cluster 4.0.9 之一: make && make install
os: centos7.4 redis:4.0.9 ruby:2.3.4 ip 规划 redis1 192.168.56.101 redis2 192.168.56.102 用两台虚拟机模拟6个redis节点。 分别为 192.168.56.101 的 9001、9002、9003 端口, 192.168.56.102 的 9001、9002、9003 端口。...原创 2018-05-18 17:22:12 · 1129 阅读 · 0 评论 -
redis cluster 4.0.9 之二: failover
os: centos7.4 redis:4.0.9 ruby:2.3.4 ip 规划 redis1 192.168.56.101 redis2 192.168.56.102 用两台虚拟机模拟6个redis节点。 分别为 192.168.56.101 的 9001、9002、9003 端口, 192.168.56.102 的 9001、9002、9003 端口。 ...原创 2018-05-21 19:05:01 · 682 阅读 · 0 评论 -
redis cluster 4.0.9 之三: startup stop
os: centos7.4 redis:4.0.9 ruby:2.3.4 ip 规划 redis1 192.168.56.101 redis2 192.168.56.102 用两台虚拟机模拟6个redis节点。 分别为 192.168.56.101 的 9001、9002、9003 端口, 192.168.56.102 的 9001、9002、9003 端口。...原创 2018-05-21 19:11:32 · 580 阅读 · 0 评论 -
redis cluster 4.0.9 之四: redis-trib.rb add-node
os: ubuntu 16.04 redis:4.0.9 ruby:2.4.4 ip规划 192.168.0.101 7000,7001,7002 192.168.0.102 7000,7001,7002 192.168.0.103 7000,7001,7002 现在加三个redis实例 192.168.0.101 7003 192.168.0.102 7003 192.168.0.103 700...原创 2018-11-01 15:58:28 · 2450 阅读 · 0 评论 -
redis cluster 4.0.9 之五: redis-trib.rb del-node
os: ubuntu 16.04 redis:4.0.9 ruby:2.4.4 ip规划 192.168.0.101 7000,7001,7002,7003 192.168.0.102 7000,7001,7002,7003 192.168.0.103 7000,7001,7002,7003 上一篇blog介绍了 add-node、reshard ,这篇blog介绍下 del-node 下面简单记...原创 2018-11-02 11:38:15 · 1040 阅读 · 1 评论 -
redis cluster 4.0.9 之六: redis-trib.rb reshard
os: ubuntu 16.04 redis:4.0.9 ruby:2.4.4 <<redis cluster 4.0.9 之四: redis-trib.rb add-node>> 添加好 master 和 slave 后,就要 reblance slots. redis-trib.rb reshard 现在手动重新分配 slots # /usr/redis/redis-4...原创 2019-03-29 10:51:07 · 1277 阅读 · 0 评论 -
redis cluster 4.0.9 之七:redis.conf
os: centos7.4 redis:4.0.9 redis.conf #监听port port 9001 #监听ip bind 192.168.56.101 #redis后台运行 daemonize yes #pidfile路径 pidfile /tmp/redis_9001.pid #开启集群 cluster-enabled yes #集群的配置文件 cluster-config-file ...原创 2020-05-07 18:09:39 · 295 阅读 · 0 评论 -
redis 5.0.5 单节点常用 redis.conf
os: centos7.4 redis:5.0.5 redis.conf bind 127.0.0.1 protected-mode yes port 6379 tcp-backlog 511 timeout 0 tcp-keepalive 300 daemonize no supervised no pidfile /var/run/redis_6379.pid loglevel notice ...原创 2020-05-07 18:46:29 · 559 阅读 · 0 评论 -
redis 设置最大内存上限对置换策略的解读
redis 实际使用内存快达到 maxmemory 时,需要删除一些数据。 redis的置换策略一共有6种: 1、默认为 noeviction :redis数据库达到最大内存时会不进行置换key,但是会返回给客户端一个错误信息 2、volatile-lru:对生存周期内很少有使用key进行置换 3、volatile-random:对生存周期中的key进行随机置换 4、volatile-ttl:...原创 2020-05-08 12:32:46 · 697 阅读 · 0 评论 -
redis sentinel 5.0.5 之二:setup sentinel
os: centos7.4 redis:5.0.5 192.168.56.101 sent1 192.168.56.102 sent2 192.168.56.103 sent3 192.168.56.104 red1 192.168.56.105 red2 192.168.56.106 red3 Redis-Sentinel 是Redis官方推荐的高可用性(HA)解决方案,当Redis做Master-slave的高可用方案时,假如master宕机了,Redis-Sentinel 就能实现自动原创 2020-05-19 20:36:16 · 483 阅读 · 1 评论 -
redis sentinel 5.0.5 之一:redis master-slave
os: centos7.4 redis:5.0.5 192.168.56.101 sent1 192.168.56.102 sent2 192.168.56.103 sent3 192.168.56.104 red1 192.168.56.105 red2 192.168.56.106 red3 Redis-Sentinel 是Redis官方推荐的高可用性(HA)解决方案,当Redis做Master-slave的高可用方案时,假如master宕机了,Redis-Sentinel 就能实现自原创 2020-05-19 19:18:33 · 355 阅读 · 0 评论 -
centos 7.x 安装 redis 的优化设置
os: centos 7.4.1708 epel # wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo; yum clean all ; yum makecache yum # yum install wget mpstat dstat git iftop sysstat telnet hdparm nu...原创 2020-05-07 16:25:32 · 574 阅读 · 0 评论 -
redis 生成测试数据
redis cluster 只有 0号数据库. redis-cli debug # redis-cli -c -h 192.168.56.88 -p 7000 127.0.0.1:7000> debug populate 10000 或者 # redis-cli -c -h 192.168.56.88 -p 7000 debug populate 10000 shell # vi /...原创 2019-03-27 16:32:14 · 2048 阅读 · 0 评论 -
redis 3.2 出现警告 [WARNING] Node 192.168.56.88:7001 has slots in importing state
os: ubuntu 16.04 redis:3.2.11 ruby:2.3.1 redis cluster 3.2 在 set 时提示 (error) CLUSTERDOWN The cluster is down. # redis-cli -c -h 192.168.56.92 -p 7000 192.168.56.92:7000> cluster nodes 03c405d63a19b...原创 2019-03-29 16:56:42 · 3649 阅读 · 1 评论