8. Redis集群(redis cluster)node
1
2
3
4
5
6
7
8
|
############################ REDIS CLUSTER ##########################
# cluster-enabled yes ##开启redis集群
# cluster-config-file nodes-6379.conf ##集群配置文件(启动自动生成)
# cluster-node-timeout 15000 ##节点互联超时的阀值
# cluster-slave-validity-factor 10 ##slave节点检测因素,开始failover的超时时限是经过factor与timeout的乘积来肯定的
# cluster-migration-barrier 1 ##设置master只有在关联多少slave时才会触发迁移过程
# cluster-require-full-coverage yes
##集群各节点在检测到至少一个hash槽位遗漏的状况下将中止处理查询请求。如集群部分节点宕机(例如部分hash槽位没有被分配)会形成整个集群不可用,直到全部槽位均被分配时才会自动恢复为可用状态
|
9. 慢日志(slow log)redis
1
2
3
4
|
############################### SLOW LOG #############################
##redis慢日志是指一个系统进行日志查询超过了指定时长。这个时长不包括IO操做,如与客户端的交互、发送响应内容等,而仅包括实际执行查询命令的时间。针对慢日志,可设置两个参数,一个是执行时长,单位是微秒;另外一个是慢日志的长度。当一个新的命令被写入日志时,最老的一条会从命令日志队列中被移除。
slowlog-log-slower-than 10000
##设置执行时长为10000微秒(单位为微秒,负数表示禁用慢日志功能,而0则表示强制记录每个命令)
slowlog-max-len 128
##设置慢日志最大长度
|
10. 延迟监控(latency monitor)bash
1
2
|
############################# LATENCY MONITOR ####################
latency-monitor-threshold 0
##用LATENCY打印redis实例在跑命令时的耗时图表,只记录大于等于所设置值的操做(0表示关闭监控)
|
11. 事件通知(event notification)----向客户端通知某些事件的发生数据结构
1
2
|
########################## EVENT NOTIFICATION #######################
notify-keyspace-events
""
##通知pub/sub客户端关于key空间的变化(默认关闭)
|
12. 高级配置(advanced config)
ide
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
############################# ADVANCED CONFIG ########################
##有关哈希数据结构的配置项
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
##有关HyperLogLog字节限制的配置项
hll-sparse-max-bytes 3000
##关因而否须要再哈希的配置项
activerehashing
yes
##关于客户端输出缓冲的控制项
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
##有关频率的配置项
hz 10
##有关重写aof的配置项
aof-rewrite-incremental-fsync
yes
|
本文出自 “记事本” 博客,请务必保留此出处http://wangzhijian.blog.51cto.com/6427016/1734868ui