ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] ## 概述 高可用的主从 ## 主从模式(一主多从) redis.6371.conf ``` port 6371 bind 0.0.0.0 logfile "6371.log" dbfilename 6371dump.rdb ``` redis.6372.conf ``` port 6372 bind 0.0.0.0 logfile "6372.log" dbfilename 6372dump.rdb slaveof 127.0.0.1 6371 ``` 运行 ``` //主 redis-server.exe redis.6371.conf //从,从可起多个 redis-server.exe redis.6372.conf ``` ## 配置 ### 添加redis redis.6371.conf ``` port 6371 bind 0.0.0.0 logfile "6371.log" dbfilename 6371dump.rdb ``` redis.6372.conf ``` port 6372 bind 0.0.0.0 logfile "6372.log" dbfilename 6372dump.rdb ``` redis.6373.conf ``` port 6373 bind 0.0.0.0 logfile "6373.log" dbfilename 6373dump.rdb ``` ### 添加哨兵配置 sentinel6370.conf ``` port 6370 bind 0.0.0.0 logfile "6370.log" dbfilename 6370dump.rdb dir sentinel sentinel monitor mymaster 127.0.0.1 6371 1 sentinel down-after-milliseconds mymaster 60000 sentinel failover-timeout mymaster 180000 sentinel parallel-syncs mymaster 1 ```