Version: spring-session-data-redis-2.2.5.RELEASE

In my application, I am using Jedis to connect to the Amazon Redis cluster. Everything went well until recently AWS forced to upgrade all the Redis sever version 5.0.3 to the 5.0.6. What we observed is that after the upgrade, the application still works without any restart. However, the org.springframework.data.redis.connection.RedisConnectionCommands#ping took too much longer than normal. If we restart the application, the command ping is fast again.

We spent much time to analyze this issue because it was a big issue of our application. In the analysis, we found that the issue comes from the method org.springframework.data.redis.connection.jedis.JedisClusterConnection.JedisClusterTopologyProvider#getTopology When upgrading Redis version (we don't know exactly what Amazon did), but we can see that it created new cluster with new IP address and its slaves. The old nodes of old cluster are cached but they were no longer available. The current logic shuffle the list and then loop over and try to reach the node. So if the invalid nodes are at the beginning of the list, it will take time to reach the valid node. It explains why the command "ping" randomly slow & fast. It depends on the shuffle method.

Spring Spring session data redis has issue when AWS Redis cluster upgrade version

Spring Spring session data redis has issue when AWS Redis cluster upgrade version

It would be great if the team could have a look and see if it is really a bug?

Thanks and best regards, Binh

Comment From: bclozel

Hello, Could you create this issue against the Spring Session project? This is the issue tracker for Spring Framework.

See https://github.com/spring-projects/spring-session/issues

Thanks!

Comment From: vpavic

Note that this likely seems to be more of an issue for Spring Data Redis, rather than Spring Session.