当前位置:网站首页>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
边栏推荐
- Hello world of vertx
- PAT甲级 1031 Hello World for U
- The babbage industrial policy forum
- Technical dry goods Shengsi mindspire elementary course online: from basic concepts to practical operation, 1 hour to start!
- Image recognition and detection -- Notes
- PAT甲级 1028 List Sorting
- Vertx's responsive MySQL template
- Go language foundation ----- 16 ----- goroutine, GPM model
- 密西根大学张阳教授受聘中国上海交通大学客座教授(图)
- Lucene skip table
猜你喜欢
【CoppeliaSim4.3】C#调用 remoteApi控制场景中UR5
Leetcode 213: looting II
技术干货|昇思MindSpore初级课程上线:从基本概念到实操,1小时上手!
Inverted chain disk storage in Lucene (pfordelta)
【MySQL 14】使用DBeaver工具远程备份及恢复MySQL数据库(Linux 环境)
Analysis of the problems of the 10th Blue Bridge Cup single chip microcomputer provincial competition
Shengsi mindspire is upgraded again, the ultimate innovation of deep scientific computing
技术干货|昇思MindSpore算子并行+异构并行,使能32卡训练2420亿参数模型
Go language foundation ----- 06 ----- anonymous fields, fields with the same name
[mindspire paper presentation] summary of training skills in AAAI long tail problem
随机推荐
Robots protocol
Industrial resilience
【MySQL 14】使用DBeaver工具远程备份及恢复MySQL数据库(Linux 环境)
Technical dry goods Shengsi mindspire innovation model EPP mvsnet high-precision and efficient 3D reconstruction
华为S5700交换机初始化和配置SSH和TELNET远程登录方法
lucene scorer
List exercises after class
项目经验分享:基于昇思MindSpore实现手写汉字识别
Technical dry goods | reproduce iccv2021 best paper swing transformer with Shengsi mindspire
华为交换机Console密码重置、设备初始化、默认密码
Pgadmin 4 v6.11 release, PostgreSQL open source graphical management tool
Vertx's responsive MySQL template
PgSQL converts string to double type (to_number())
PAT甲级 1027 Colors in Mars
Collector in ES (percentile / base)
Go language - loop statement
华为交换机配置ssh登录远程管理交换机
【CoppeliaSim4.3】C#调用 remoteApi控制场景中UR5
研究显示乳腺癌细胞更容易在患者睡觉时进入血液
技术干货|AI框架动静态图统一的思考