I'm using redis hashes to store metadata associated with a single key which in my case is userId. I have a batchAPI where I pass in a batch of userIds and get the metadata back. Redis Cluster doesn't support multi key commands so What's the best way to achieve this with RedisCluster? I am using Jedis as the Java Client to connect to Redis.
1 Answers
4
votes
If Lettuce is an option for you, then from 4.0.Final MGET on cluster is supported:
The cluster API was extended to run a command on multiple nodes and invocation to multi-key commands DEL, MGET, MSET and MSETNX perform automatic pipelining if the keys belong to different slots/masters.
(Source: https://github.com/mp911de/lettuce/releases/tag/4.0.Final)
MOVEDmessages. I'm not sure whether Jedis does that for you on the fly or for batches (?) but you can try asking its mailing list: groups.google.com/forum/#!forum/jedis_redis - Itamar Haber