为了保证项目线上整体高可用。改造Redis为哨兵集群模式(3个redis,3个哨兵)
不知道咱们框架对接Redis的 Sentinel哨兵配置文件修改要点是什么?是否还需要额外的配置选项?
配置这块没有做过改动,按照springboot原生方式对接就行。
经过测试Bladex 2.8 配置了 Redis的Sentinel哨兵配置还是报错无法使用。
但是使用:https://github.com/chanjarster/spring-boot-redis-sentinel-example
这个项目下代码,配置文件改为我的本地环境,是可以正常连接使用的。
spring: redis: password: 123456 sentinel: master: mymaster nodes: - slave1:7601 - slave1:7602 - slave1:7603