Why is data getting stored with weird keys in Redis when using Jedis with Spring Data?

Ok, googled around for a while and found help at http://java.dzone.com/articles/spring-data-redis. It happened because of Java serialization. The key serializer for redisTemplate needs to be configured to StringRedisSerializer i.e. like this: <bean id=”jedisConnectionFactory” class=”org.springframework.data.redis.connection.jedis.JedisConnectionFactory” p:host-name=”${redis.server}” p:port=”${redis.port}” p:use-pool=”true”/> <bean id=”stringRedisSerializer” class=”org.springframework.data.redis.serializer.StringRedisSerializer”/> <bean id=”redisTemplate” class=”org.springframework.data.redis.core.RedisTemplate” p:connection-factory-ref=”jedisConnectionFactory” p:keySerializer-ref=”stringRedisSerializer” p:hashKeySerializer-ref=”stringRedisSerializer” /> Now the key in redis is vc:501381. Or … Read more

What’s the Point of Multiple Redis Databases?

You don’t want to use multiple databases in a single redis instance. As you noted, multiple instances lets you take advantage of multiple cores. If you use database selection you will have to refactor when upgrading. Monitoring and managing multiple instances is not difficult nor painful. Indeed, you would get far better metrics on each … Read more