chore(deploy): Add high availability cluster deployment configuration
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
# Redis 主节点配置 (Node-01)
|
||||
|
||||
# 网络配置
|
||||
bind 0.0.0.0
|
||||
port 6379
|
||||
protected-mode no
|
||||
|
||||
# 进程配置
|
||||
daemonize no
|
||||
pidfile /var/run/redis/redis-server.pid
|
||||
logfile /var/log/redis/redis-server.log
|
||||
|
||||
# 数据目录
|
||||
dir /data
|
||||
|
||||
# 内存配置
|
||||
maxmemory 2gb
|
||||
maxmemory-policy allkeys-lru
|
||||
|
||||
# 持久化配置 - RDB
|
||||
save 900 1
|
||||
save 300 10
|
||||
save 60 10000
|
||||
stop-writes-on-bgsave-error yes
|
||||
rdbcompression yes
|
||||
rdbchecksum yes
|
||||
dbfilename dump.rdb
|
||||
|
||||
# 持久化配置 - AOF
|
||||
appendonly yes
|
||||
appendfilename "appendonly.aof"
|
||||
appendfsync everysec
|
||||
no-appendfsync-on-rewrite no
|
||||
auto-aof-rewrite-percentage 100
|
||||
auto-aof-rewrite-min-size 64mb
|
||||
|
||||
# 密码配置
|
||||
requirepass redis_HA_Cluster_2024
|
||||
masterauth redis_HA_Cluster_2024
|
||||
|
||||
# 性能配置
|
||||
tcp-keepalive 300
|
||||
tcp-backlog 511
|
||||
timeout 0
|
||||
|
||||
# 慢查询日志
|
||||
slowlog-log-slower-than 10000
|
||||
slowlog-max-len 128
|
||||
|
||||
# 客户端配置
|
||||
maxclients 10000
|
||||
|
||||
# 集群配置 (单机模式不需要)
|
||||
# cluster-enabled no
|
||||
Reference in New Issue
Block a user