当前位置:网站首页>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
边栏推荐
- 华为交换机Console密码重置、设备初始化、默认密码
- 技术干货|昇思MindSpore NLP模型迁移之LUKE模型——阅读理解任务
- 密西根大学张阳教授受聘中国上海交通大学客座教授(图)
- 项目经验分享:实现一个昇思MindSpore 图层 IR 融合优化 pass
- Paper learning -- Study on the similarity of water level time series of Xingzi station in Poyang Lake
- 技术干货|昇思MindSpore Lite1.5 特性发布,带来全新端侧AI体验
- [set theory] order relation (partial order relation | partial order set | example of partial order set)
- PHP常用排序算法
- URL programming
- OSPF protocol summary
猜你喜欢

PAT甲级 1031 Hello World for U

Go language foundation ------ 14 ------ gotest

Hnsw introduction and some reference articles in lucene9

技术干货|关于AI Architecture未来的一些思考

Analysis of the ninth Blue Bridge Cup single chip microcomputer provincial competition

Analysis of the problems of the 10th Blue Bridge Cup single chip microcomputer provincial competition

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

技术干货|昇思MindSpore可变序列长度的动态Transformer已发布!

Technical dry goods Shengsi mindspire operator parallel + heterogeneous parallel, enabling 32 card training 242 billion parameter model

项目经验分享:基于昇思MindSpore实现手写汉字识别
随机推荐
Vertx metric Prometheus monitoring indicators
Iterm2设置
【LeetCode】2. Valid Parentheses·有效的括号
【MySQL 11】怎么解决MySQL 8.0.18 大小写敏感问题
Paper learning -- Study on the similarity of water level time series of Xingzi station in Poyang Lake
Beginners use Minio
Go language foundation ----- 18 ----- collaboration security, mutex lock, read-write lock, anonymous lock, sync Once
PAT甲级 1028 List Sorting
Robots protocol
Lucene hnsw merge optimization
Technical dry goods Shengsi mindspire operator parallel + heterogeneous parallel, enabling 32 card training 242 billion parameter model
【踩坑系列】mysql 修改root密码失败
技术干货|昇思MindSpore NLP模型迁移之Roberta ——情感分析任务
PDO and SDO concepts
c语言指针的概念
Analysis of the ninth Blue Bridge Cup single chip microcomputer provincial competition
[set theory] Stirling subset number (Stirling subset number concept | ball model | Stirling subset number recurrence formula | binary relationship refinement relationship of division)
Some basic operations of reflection
【CoppeliaSim4.3】C#调用 remoteApi控制场景中UR5
Hello world of vertx