当前位置:网站首页>Redis配置文件
Redis配置文件
2022-07-03 07:42:00 【老王笔记】
redis.conf
tcp-backlog 511
timeout 0
tcp-keepalive 300
daemonize yes
loglevel notice
logfile ""
databases 16
always-show-logo no
set-proc-title yes
proc-title-template "{title} {listen-addr} {server-mode}"
save 3600 1 300 100 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
rdb-del-sync-files no
dir ./
replica-serve-stale-data yes
replica-read-only yes
repl-diskless-sync yes
repl-diskless-sync-delay 5
repl-diskless-sync-max-replicas 0
repl-diskless-load disabled
repl-disable-tcp-nodelay no
replica-priority 100
acllog-max-len 128
lazyfree-lazy-eviction no
lazyfree-lazy-expire no
lazyfree-lazy-server-del no
replica-lazy-flush no
lazyfree-lazy-user-del no
lazyfree-lazy-user-flush no
oom-score-adj no
oom-score-adj-values 0 200 800
disable-thp yes
appendonly no
appendfilename "appendonly.aof"
appenddirname "appendonlydir"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
aof-use-rdb-preamble yes
aof-timestamp-enabled no
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-listpack-entries 512
hash-max-listpack-value 64
list-max-listpack-size -2
list-compress-depth 0
set-max-intset-entries 512
zset-max-listpack-entries 128
zset-max-listpack-value 64
hll-sparse-max-bytes 3000
stream-node-max-bytes 4096
stream-node-max-entries 100
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit replica 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
dynamic-hz yes
aof-rewrite-incremental-fsync yes
rdb-save-incremental-fsync yes
jemalloc-bg-thread yes另外每个Redis实例单独一个port.conf配置文件
# 6379.conf
include /export/data/redis/redis.conf
pidfile "/export/data/redis/6379.pid"
port 6379
dbfilename "6379.rdb"
sentinel.conf 配置文件
protected-mode no
daemonize yes
port 26379
dir "/export/data/redis"
logfile "/export/data/redis/log/sentinel.log"
# 哨兵sentinel监控的redis主节点的
# ip:主机ip地址
# port:哨兵端口号
# master-name:可以自己命名的主节点名字
# quorum:当这些quorum个数sentinel哨兵认为master主节点失联 那么这时客观上认为主节点失联了
# sentinel monitor <master-name> <ip> <redis-port> <quorum>
sentinel monitor mymaster 127.0.0.1 6380 1
# 当在Redis实例中开启了requirepass,所有连接Redis实例的客户端都要提供密码。
# sentinel auth-pass <master-name> <password>
# sentinel auth-pass mymaster 123456
# 指定主节点应答哨兵sentinel的最大时间间隔,超过这个时间,哨兵主观上认为主节点下线,
# 默认30秒
# sentinel down-after-milliseconds <master-name> <milliseconds>
sentinel down-after-milliseconds mymaster 10000
# 指定了在发生failover主备切换时,最多可以有多少个slave同时对新的master进行同步。
# 这个数字越小,完成failover所需的时间就越长;反之,但是如果这个数字越大,就意味着
# 越多的slave因为replication而不可用。可以通过将这个值设为1,来保证每次只有一个slave,
# 处于不能处理命令请求的状态。
# sentinel parallel-syncs <master-name> <numslaves>
sentinel parallel-syncs mymaster 1
# Generated by CONFIG REWRITE
latency-tracking-info-percentiles 50 99 99.9
user default on nopass sanitize-payload ~* &* [email protected]
sentinel myid c6c321b3c25ec7613f90ce8d0af38a4a5a1f1a21
sentinel config-epoch mymaster 6
sentinel leader-epoch mymaster 6
sentinel current-epoch 6
sentinel known-replica mymaster 127.0.0.1 6381
sentinel known-replica mymaster 127.0.0.1 6379
边栏推荐
- Technical dry goods | alphafold/ rosettafold open source reproduction (2) - alphafold process analysis and training Construction
- Go language foundation ----- 10 ----- string related operations (operation function, string conversion)
- 项目经验分享:实现一个昇思MindSpore 图层 IR 融合优化 pass
- Application of pigeon nest principle in Lucene minshouldmatchsumscorer
- Qtip2 solves the problem of too many texts
- Analysis of the ninth Blue Bridge Cup single chip microcomputer provincial competition
- C2-关于VCF文件合并的几种方法
- Go language foundation ----- 13 ----- file
- JUnit unit test of vertx
- Leetcode 213: 打家劫舍 II
猜你喜欢

c语言指针的概念

Go language foundation ----- 05 ----- structure

Partage de l'expérience du projet: mise en œuvre d'un pass optimisé pour la fusion IR de la couche mindstore

VMware network mode - bridge, host only, NAT network

Leetcode 198: 打家劫舍

Various postures of CS without online line

【开发笔记】基于机智云4G转接板GC211的设备上云APP控制

Go language foundation ----- 01 ----- go language features

研究显示乳腺癌细胞更容易在患者睡觉时进入血液

技术干货|AI框架动静态图统一的思考
随机推荐
Leetcode 213: looting II
Unity XR实现交互(抓取,移动旋转,传送,射击)-Pico
Technical dry goods | hundred lines of code to write Bert, Shengsi mindspire ability reward
华为交换机:配置telnet和ssh、web访问
Responsive MySQL of vertx
Technical dry goods | alphafold/ rosettafold open source reproduction (2) - alphafold process analysis and training Construction
opensips与对方tls sip trunk对接注意事项
The difference between typescript let and VaR
OSPF protocol summary
密西根大学张阳教授受聘中国上海交通大学客座教授(图)
【LeetCode】4. Best Time to Buy and Sell Stock·股票买卖最佳时机
PAT甲级 1028 List Sorting
Hello world of vertx
項目經驗分享:實現一個昇思MindSpore 圖層 IR 融合優化 pass
华为S5700交换机初始化和配置SSH和TELNET远程登录方法
SQL create temporary table
[coppeliasim4.3] C calls UR5 in the remoteapi control scenario
Go language - loop statement
C2-关于VCF文件合并的几种方法
技术干货|昇思MindSpore NLP模型迁移之LUKE模型——阅读理解任务