环境:

ip  172.16.1.31 26379  redis sentinel

ip  172.16.1.30 6379   主 1

ip  172.16.1.31 6380   从 1

ip  172.16.1.31 6379   主 2

ip  172.16.1.30 6380   从 2

redis 主 服务器配置,按照默认的配置文件既可。

redis 从 服务器配置,需要在配置文件配置 slaveof 的配置,配置为主服务器IP 与 端口

配置完成以后,启动主服务,再启用从服务

查看主redis信息

redis-cli -h 172.16.1.30 info Replication

配置 redis sentinel 集群监控服务

redis 源码安装包 里面会包含 sentinel.conf 复制一份

编辑 sentinel.conf

#redis-0

sentinel announce-ip 172.16.1.31

port 26379

#master1

sentinel monitor master1 172.16.1.30 6379 1

sentinel down-after-milliseconds master1 5000

sentinel parallel-syncs master1 2

sentinel failover-timeout master1 900000

#master2

sentinel monitor master2 172.16.1.31 6379 1

sentinel down-after-milliseconds master2 5000

sentinel parallel-syncs master2 2

sentinel failover-timeout master2 900000

sentinel announce-ip 设置消息中使用指定的ip地址,而不是自动发现的本地地址。

sentinel monitor   设置redis 群集名字,IP ,端口 , 1 表示 多少台 sentinel 决定故障,如果设置为2 表示需要2台sentinel 监控到故障才会进行切换

启动sentinel 群集监控

测试启动

/usr/local/bin/redis-sentinel /opt/local/redis/conf/sentinel.conf --sentinel

redis sentinel 集群监控 配置的更多相关文章

  1. redis sentinel集群的搭建

    背景说明: 这里采用1主2从的redis集群,3个sentinel搭建高可用redis集群. 一,关于搭建redis-sentinel高可用之前,我们必须要了解redis主从搭建redis-senti ...

  2. Redis Sentinel 集群安装 step by step

    一. 准备材料 服务器 IP address 操作系统 位数 Redis 版本   CNT06CAH05 192.168.3.47 CentOS 6.5 x64 Redis-3.2.6 sentine ...

  3. redis cluster 集群 安装 配置 详解

    redis cluster 集群 安装 配置 详解 张映 发表于 2015-05-01 分类目录: nosql 标签:cluster, redis, 安装, 配置, 集群 Redis 集群是一个提供在 ...

  4. Redis Sentinel集群配置中的一些细节

    今天在配置Redis集群,用作Tomcat集群的缓存共享.关于Redis集群的配置网上有很多文章,这里只是记录一下我在配置过程中遇到的一些小的细节问题. 1. 关于Protected Mode的问题 ...

  5. Redis Sentinel集群双机房容灾实施步骤

    概要目标防止双机房情况下任一个机房完全无法提供服务时如何让Redis继续提供服务.架构设计A.B两机房,其中A机房有一Master一Slave和两个Sentinel,B机房只有2个Sentinel,如 ...

  6. redis sentinel 集群配置-主从切换

    1.配置redis master,redis slave(配置具体操作见上文http://www.cnblogs.com/wangchaozhi/p/5140469.html). redis mast ...

  7. redis sentinel集群配置及haproxy配置

    ip分布情况: sentinel-1/redis 主 10.11.11.5 sentinel-2/redis 从 10.11.11.7 sentinel-3/redis 从 10.11.11.8 ha ...

  8. helm安装redis+Sentinel集群搭建

    一.redis集群特点 数据 在多个Redis节点之间自动分片 sentinel特点: 它的主要功能有以下几点 不时地监控redis是否按照预期良好地运行; 如果发现某个redis节点运行出现状况,能 ...

  9. redis sentinel集群

    ip分布情况: sentinel-1/redis 主 10.11.11.5 sentinel-2/redis 从 10.11.11.7 sentinel-3/redis 从 10.11.11.8 ha ...

随机推荐

  1. Clock Pictures

    Clock Pictures 题目描述 You have two pictures of an unusual kind of clock. The clock has n hands, each h ...

  2. Hidden Word

    Hidden Word time limit per test 2 seconds memory limit per test 256 megabytes input standard input o ...

  3. T-shirts Distribution

    T-shirts Distribution time limit per test 1 second memory limit per test 256 megabytes input standar ...

  4. PHP 实现定时任务的几种方法

    一. 简单直接不顾后果型 <?php ignore_user_abort();//关掉浏览器,PHP脚本也可以继续执行. set_time_limit(0);// 通过set_time_limi ...

  5. RACSignal的Subscription深入

    ReactiveCocoa是一个FRP的思想在Objective-C中的实现框架,目前在美团的项目中被广泛使用.对于ReactiveCocoa的基本用法,网上有很多相关的资料,本文不再讨论.RACSi ...

  6. java 面向抽象编程的思想

    SIM.java public abstract class SIM { public abstract void setNumber(String n); public abstract Strin ...

  7. Windows Batch Scripts

    Some simple examples: simple.bat @echo off set _var1=3 set _var2=5 set /a _result=%_var1%+%_var2% ec ...

  8. PAT (Advanced Level) 1106. Lowest Price in Supply Chain (25)

    简单dfs #include<cstdio> #include<cstring> #include<cmath> #include<vector> #i ...

  9. Chapter 1 First Sight——24

    He looked away quickly, more quickly than I could, though in a flush of embarrassment I dropped my e ...

  10. jq的事件对象的属性

    1.event.type() 该方法的作用是可以获取到时间的类型 $('a').click(function(){ alert(event.type);//获取事件类型 return  false;/ ...