skip to Main Content

Configuration Redis Sentinel in Micronaut

I currently have a running application with Redis and I would like to add Redis Sentinel configuration to ensure high availability for my database. Could someone help me with configuring Redis Sentinel in Micronaut? Application.yml file: redis: uri: redis-sentinel://localhost:26379,localhost:26380,localhost:26381/0#redismaster My…


Spring Boot Caching with Redis Sentinel always connects to master node

I have a Spring Boot (2.3.1.RELEASE) app that has caching with Redis Sentinel. This is my configuration for the Sentinel connection: @Bean public LettuceConnectionFactory redisConnectionFactory() { RedisSentinelConfiguration sentinelConfig = new RedisSentinelConfiguration() .master(redisProperties.getSentinel().getMaster()); redisProperties.getSentinel().getNodes().forEach(s -> sentinelConfig.sentinel(s, redisProperties.getPort())); sentinelConfig.setPassword(RedisPassword.of(redisProperties.getPassword())); return new LettuceConnectionFactory(sentinelConfig);…

Back To Top