摘要: 首先配置redis.conf文件如下6个位置 配置: 主机不动,配置从机 slaveof host port info replication查看主从信息 常用配置 一主二从 (主机能读写,从机只能读) 读写分离 薪火相传 反客为主 实际开发使用哨兵模式 阅读全文
posted @ 2018-06-19 22:27 1161588342 阅读(133) 评论(0) 推荐(0) 编辑
摘要: redis支持事务吗? 答: Redis部分支持事务 采用了乐观锁机制Check And Set DISCARD 丢弃事务 WATCH 监控,相当于上锁 MULTI 开启事务 入队 EXEC 执行列队的命令 UNWATCH 用于取消WATCH 对KEY的监控 阅读全文
posted @ 2018-06-19 22:25 1161588342 阅读(81) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/machanghai/p/5501838.html 阅读全文
posted @ 2018-06-19 12:42 1161588342 阅读(83) 评论(0) 推荐(0) 编辑
摘要: rdb (默认打开)触发条件 In the example below the behaviour will be to save:# after 900 sec (15 min) if at least 1 key changed# after 300 sec (5 min) if at leas 阅读全文
posted @ 2018-06-19 12:00 1161588342 阅读(82) 评论(0) 推荐(0) 编辑