Redis安装,主从,主备切换
daemonize yes
pidfile /export/Data/redis_pid/redis_6379.pid
port 6379
# tcp-backlog 511
timeout 300
tcp-keepalive 0
loglevel notice
logfile /export/Logs/redis/redis_6379.log
databases 16
stop-writes-on-bgsave-error yes
rdbcompression yes
dbfilename 6379.rdb
dir /export/Data/redis_data/6379
slave-serve-stale-data yes
slave-read-only yes
repl-disable-tcp-nodelay no
repl-backlog-size 128mb
maxmemory 2g
appendonly no
appendfilename 6379.aof
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 1024
# notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
# hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 512mb 256mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
rename-command keys jkeys
daemonize yes
slaveof 10.187.120.5 6379
pidfile /export/Data/redis_pid/redis_6379.pid
port 6379
# tcp-backlog 511
timeout 300
tcp-keepalive 0
loglevel notice
logfile /export/Logs/redis/redis_6379.log
databases 16
stop-writes-on-bgsave-error yes
rdbcompression yes
dbfilename 6379.rdb
dir /export/Data/redis_data/6379
slave-serve-stale-data yes
slave-read-only yes
repl-disable-tcp-nodelay no
repl-backlog-size 128mb
maxmemory 2g
appendonly no
appendfilename 6379.aof
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 1024
# notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
# hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 512mb 256mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
rename-command keys jkeys
daemonize yes
slaveof 10.187.120.5 6379
pidfile /export/Data/redis_pid/redis_6379.pid
port 6379
# tcp-backlog 511
timeout 300
tcp-keepalive 0
loglevel notice
logfile /export/Logs/redis/redis_6379.log
databases 16
stop-writes-on-bgsave-error yes
rdbcompression yes
dbfilename 6379.rdb
dir /export/Data/redis_data/6379
slave-serve-stale-data yes
slave-read-only yes
repl-disable-tcp-nodelay no
repl-backlog-size 128mb
maxmemory 2g
appendonly no
appendfilename 6379.aof
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 1024
# notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
# hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 512mb 256mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
rename-command keys jkeys
三.主备切换
port 26379
daemonize yes
sentinel monitor mymaster 10.187.120.5 6379 2
sentinel down-after-milliseconds mymaster 10000
sentinel failover-timeout mymaster 900000
#sentinel can-failover mymaster yes
sentinel config-epoch mymaster 0
# Generated by CONFIG REWRITE
dir "/export/servers/redis-2.8.19"
sentinel leader-epoch mymaster 0
sentinel known-slave mymaster 10.187.69.59 6379
sentinel known-slave mymaster 10.187.69.58 6379
#sentinel known-sentinel mymaster 10.187.69.59 26379 84ac24684dc485bc0c4bcf84a03d7cdb12d32ac9
#sentinel known-sentinel mymaster 10.187.69.58 26379 68da3e5c7d7da1ac1dfb542741bd89181fdda580
sentinel current-epoch 0
daemonize yes
port 26379
sentinel monitor mymaster 10.187.120.5 6379 2
sentinel down-after-milliseconds mymaster 10000
sentinel failover-timeout mymaster 900000
#sentinel can-failover mymaster yes
sentinel config-epoch mymaster 0
#Generated by CONFIG REWRITE
dir "/export/servers/redis-2.8.19"
sentinel leader-epoch mymaster 0
sentinel known-slave mymaster 10.187.69.58 6379
# Generated by CONFIG REWRITE
sentinel known-slave mymaster 10.187.69.59 6379
sentinel current-epoch 0
daemonize yes
port 26379
sentinel monitor mymaster 10.187.120.5 6379 2
sentinel down-after-milliseconds mymaster 10000
sentinel failover-timeout mymaster 900000
#sentinel can-failover mymaster yes
sentinel config-epoch mymaster 0
#Generated by CONFIG REWRITE
dir "/export/servers/redis-2.8.19"
sentinel leader-epoch mymaster 0
sentinel known-slave mymaster 10.187.69.58 6379
# Generated by CONFIG REWRITE
sentinel known-slave mymaster 10.187.69.58 6379
sentinel known-slave mymaster 10.187.69.59 6379
sentinel current-epoch 0
Redis安装,主从,主备切换的更多相关文章
- redis+Keepalived主从热备切换实例
[root@cache-redis-~/]# cat /etc/keepalived/keepalived.conf ! Configuration File for keepalived globa ...
- 测试redis+keepalived实现简单的主备切换【转载】
转自: 测试redis+keepalived实现简单的主备切换 - Try My Best 尽力而为 - ITeye技术网站http://raising.iteye.com/blog/2311757 ...
- 在Windows Azure上配置VM主备切换(1)——Linux篇
对任何一个上线系统来说,高可用设计是不可或缺的一个环节,这样才可以确保应用可以持续.稳定的运行,而不是频繁的掉线.停机.高可用设计的核心思路很简单,就是消除一切单点故障,将单点链路或者节点升级为多点. ...
- 在Azure云上实现postgres主备切换
以下是工作上实现postgres主备切换功能所用到的代码和步骤,中间走了不少弯路,在此记录下.所用到的操作系统为centos 7.5,安装了两台服务器,hostname为VM7的为Master,VM8 ...
- Spark系列(五)Master主备切换机制
Spark Master主备切换主要有两种机制,之中是基于文件系统,一种是基于Zookeeper.基于文件系统的主备切换机制需要在Active Master挂掉后手动切换到Standby Master ...
- Nginx+Keepalived主备切换(包含nginx服务停止)
原文地址:http://blog.sina.com.cn/s/blog_79ac6aa80101bmed.html Nginx+Keepalived主备切换(包含nginx服务停止) 环境: VM中4 ...
- (摘)DataGuard物理standby管理 - 主备切换
DataGuard物理standby管理 - 主备切换 Dataguard的切换分为两种,switchover和failover. switchover一般用于数据库或硬件升级,这时只需要较短时间中断 ...
- MySQL 复制 - 性能与扩展性的基石 4:主备切换
一旦使用 MySQL 的复制功能,就很大可能会碰到主备切换的情况.也许是为了迭代升级服务器,或者是主库出现问题时,将一台备库转换成主库,或者只是希望重新分配容量.不过出于什么原因,都需要将新主库的信息 ...
- Oracle 11.2.0.4.0 Dataguard部署和日常维护(5)-Datauard 主备切换和故障转移篇
1. dataguard主备切换 1.1. 查看当前主备库是否具备切换条件 on slave select sequence#,first_time,next_time,archived,appl ...
随机推荐
- input标签的美化
css input checkbox和radio样式美化:http://www.haorooms.com/post/css_mh_ck_radio 自定义 css checkbox 样式 :http ...
- [Nginx]单机环境的多应用配置
# 服务层 # https://github.com/farwish/alconservice # alconservice.conf server { listen 8090; root /home ...
- linux ss 命令
ss 是 Socket Statistics 的缩写.ss 命令可以用来获取 socket 统计信息,它显示的内容和 netstat 类似.但 ss 的优势在于它能够显示更多更详细的有关 TCP 和连 ...
- template.compile()方法
template.compile(source, options) source:必传,渲染模板的内容. options:可选,通常不传.(其实是我还没研究明白) return:一个渲染函数. 示例如 ...
- Redis服务启动失败,提示:redis-server:command not found
今天我开始做主从复制的集群模式的测试,所以需要再装一个Linux操作系统,我在虚拟机里已经安装了一个Linux操作系统,Redis也已经配置好了.今天打算再安装一个Linux操作系统,Linux系统的 ...
- 2.Ray-消息发布器与消息存储器
消息发布器: Ray是基于Event Sourcing设计的ES/Actor框架,ESGrain状态(State)的修改.ESGrain之间的通信默认使用RabbitMQ通信.消息的发布器主要是Rab ...
- POJ2891 Strange Way to Express Integers [中国剩余定理]
不互质情况的模板题 注意多组数据不要一发现不合法就退出 #include <iostream> #include <cstdio> #include <cstring&g ...
- python---协程 学习笔记
协程 协程又称为微线程,协程是一种用户态的轻量级线程 协程拥有自己的寄存器和栈.协程调度切换的时候,将寄存器上下文和栈都保存到其他地方,在切换回来的时候,恢复到先前保存的寄存器上下文和栈,因此:协程能 ...
- Selenium_Java版本安装及初试
[环境] ①JDK版本:jdk1.8.0_73 ②Eclipse:jee-mars-4.5.2 ③Selenium:selenium-java-3.5.3 ④GoogleChrome:60 ⑤chro ...
- Maven中避开测试环节
两种方法 修改pom文件 添加<skipTests>true</skipTests>标签 <plugin> <groupId>org.apache.ma ...