Hi,
We observed that when Spring data redis + Jedis client is used to execute mGet commands over clustered redis, the performance is sub-optimal. On further analysis, it is found that the cause might well be because of Thread.sleep(10) in the implementation of JedisClusterStringCommands#mGet.
We have done a test for 8 keys and compared the performance of MGET vs GET (executed Get 8 times one for each key). It is observed that MGET on average took 80 milliseconds but GET over a loop(8 GET commands on total) took only 3 milliseconds. Sleeping thread for 10 milliseconds for Redis seems a lot. Clustered redis used contained 5 nodes.
https://github.com/spring-projects/spring-data-redis/blob/main/src/main/java/org/springframework/data/redis/connection/ClusterCommandExecutor.java#L258
Comment From: sbrannen
The issue you have described pertains to Spring Data Redis and not the core Spring Framework.
Please create an issue in the Spring Data Redis issue tracker.