redis cluster config(4.0.1)

本文涉及的产品
云数据库 Redis 版,社区版 2GB
推荐场景:
搭建游戏排行榜
简介:
daemonize yes
pidfile "/var/run/redis.6921.pid"
port 6921
# bind 192.168.1.100 10.0.0.1
# bind 127.0.0.1
# unixsocket /testdb/rd6921/datafile/redis.sock
# unixsocketperm 755
timeout 300
tcp-keepalive 60
loglevel notice
logfile "/testdb/rd6921/log/redis.log"
# syslog-enabled no
# syslog-ident redis
# syslog-facility local0
databases 16
# save ""
# save 900 1
# save 300 10
# save 60 10000
stop-writes-on-bgsave-error no
rdbcompression yes
rdbchecksum yes
dbfilename "dump.rdb"
dir "/testdb/rd6921/datafile"
# slaveof <masterip> <masterport>
# masterauth <master-password>
masterauth "testdb"
slave-serve-stale-data yes
slave-read-only yes
# repl-ping-slave-period 10
repl-timeout 600
repl-disable-tcp-nodelay no
repl-backlog-size 64mb
# repl-backlog-ttl 3600
slave-priority 100
# min-slaves-to-write 3
# min-slaves-max-lag 10
requirepass "testdb"
# rename-command CONFIG ""
maxclients 10000
maxmemory 8gb
maxmemory-policy noeviction
# maxmemory-samples 3
appendonly no
# appendfsync always
appendfsync everysec
# appendfsync no
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 1gb
lua-time-limit 5000
slowlog-log-slower-than 20000
slowlog-max-len 128
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 8gb 4gb 600
client-output-buffer-limit pubsub 32mb 8mb 60
aof-rewrite-incremental-fsync yes
lazyfree-lazy-expire yes
lazyfree-lazy-server-del yes
slave-lazy-flush yes
aof-use-rdb-preamble yes
# include /path/to/local.conf
# include /path/to/other.conf
cluster-enabled yes
cluster-config-file "nodes.conf"
cluster-node-timeout 15000
cluster-slave-validity-factor 0
cluster-migration-barrier 1
cluster-require-full-coverage no
daemonize yes
pidfile "/var/run/redis.6922.pid"
port 6922
# bind 192.168.1.100 10.0.0.1
# bind 127.0.0.1
# unixsocket /testdb/rd6922/datafile/redis.sock
# unixsocketperm 755
timeout 300
tcp-keepalive 60
loglevel notice
logfile "/testdb/rd6922/log/redis.log"
# syslog-enabled no
# syslog-ident redis
# syslog-facility local0
databases 16
# save ""
# save 900 1
# save 300 10
# save 60 10000
stop-writes-on-bgsave-error no
rdbcompression yes
rdbchecksum yes
dbfilename "dump.rdb"
dir "/testdb/rd6922/datafile"
# slaveof <masterip> <masterport>
# masterauth <master-password>
masterauth "testdb"
slave-serve-stale-data yes
slave-read-only yes
# repl-ping-slave-period 10
repl-timeout 600
repl-disable-tcp-nodelay no
repl-backlog-size 64mb
# repl-backlog-ttl 3600
slave-priority 100
# min-slaves-to-write 3
# min-slaves-max-lag 10
requirepass "testdb"
# rename-command CONFIG ""
maxclients 10000
maxmemory 8gb
maxmemory-policy noeviction
# maxmemory-samples 3
appendonly yes
# appendfsync always
appendfsync everysec
# appendfsync no
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 1gb
lua-time-limit 5000
slowlog-log-slower-than 20000
slowlog-max-len 128
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 8gb 4gb 600
client-output-buffer-limit pubsub 32mb 8mb 60
aof-rewrite-incremental-fsync yes
lazyfree-lazy-expire yes
lazyfree-lazy-server-del yes
slave-lazy-flush yes
aof-use-rdb-preamble yes
# include /path/to/local.conf
# include /path/to/other.conf
cluster-enabled yes
cluster-config-file "nodes.conf"
cluster-node-timeout 15000
cluster-slave-validity-factor 0
cluster-migration-barrier 1
cluster-require-full-coverage no
# Generated by CONFIG REWRITE
save 900 1
save 300 10
save 60 10000
相关实践学习
基于Redis实现在线游戏积分排行榜
本场景将介绍如何基于Redis数据库实现在线游戏中的游戏玩家积分排行榜功能。
云数据库 Redis 版使用教程
云数据库Redis版是兼容Redis协议标准的、提供持久化的内存数据库服务,基于高可靠双机热备架构及可无缝扩展的集群架构,满足高读写性能场景及容量需弹性变配的业务需求。 产品详情:https://www.aliyun.com/product/kvstore &nbsp; &nbsp; ------------------------------------------------------------------------- 阿里云数据库体验:数据库上云实战 开发者云会免费提供一台带自建MySQL的源数据库&nbsp;ECS 实例和一台目标数据库&nbsp;RDS实例。跟着指引,您可以一步步实现将ECS自建数据库迁移到目标数据库RDS。 点击下方链接,领取免费ECS&amp;RDS资源,30分钟完成数据库上云实战!https://developer.aliyun.com/adc/scenario/51eefbd1894e42f6bb9acacadd3f9121?spm=a2c6h.13788135.J_3257954370.9.4ba85f24utseFl
目录
相关文章
|
4月前
|
NoSQL Java Redis
Redis进阶-Jedis以及Spring Boot操作 Redis 5.x Cluster
Redis进阶-Jedis以及Spring Boot操作 Redis 5.x Cluster
53 0
|
6月前
|
NoSQL Java Redis
redis集群拓扑结构自动更新:使用Lettuce连接Cluster集群实例时异常处理(一)
redis集群拓扑结构自动更新:使用Lettuce连接Cluster集群实例时异常处理
362 0
|
4月前
|
存储 NoSQL Redis
docker搭建Redis Cluster集群环境
docker搭建Redis Cluster集群环境
94 1
|
19天前
|
存储 缓存 运维
软件体系结构 - 缓存技术(5)Redis Cluster
【4月更文挑战第20天】软件体系结构 - 缓存技术(5)Redis Cluster
140 10
|
1月前
|
运维 NoSQL 算法
Java开发-深入理解Redis Cluster的工作原理
综上所述,Redis Cluster通过数据分片、节点发现、主从复制、数据迁移、故障检测和客户端路由等机制,实现了一个分布式的、高可用的Redis解决方案。它允许数据分布在多个节点上,提供了自动故障转移和读写分离的功能,适用于需要大规模、高性能、高可用性的应用场景。
25 0
|
4月前
|
存储 NoSQL 网络协议
Redis Cluster 原理说的头头是道,这些配置不懂就是纸上谈兵
Redis Cluster 原理说的头头是道,这些配置不懂就是纸上谈兵
24 0
|
4月前
|
NoSQL Linux Redis
Redis 6.X Cluster 集群搭建
Redis 6.X Cluster 集群搭建
38 0
|
4月前
|
运维 NoSQL 算法
Redis cluster集群原理与配置
Redis cluster集群原理与配置
44 0
|
4月前
|
存储 NoSQL Redis
redis集群cluster
redis集群cluster
34 0
|
4月前
|
存储 NoSQL Redis
docker compose搭建Redis Cluster集群环境
docker compose搭建Redis Cluster集群环境
113 0