mget in cluster mode #3734
Answered
by
sueun-dev
joylannister
asked this question in
Q&A
|
In cluster mode, if the keys are not on the same shard, does it support mget? (github.com/go-redis/redis/v8 v8.11.0) thanks |
Answered by
sueun-dev
Mar 11, 2026
Replies: 1 comment
|
For I checked the cluster client code for that version. It computes the slot from the first key and sends the whole So for v8.11.0 your options are:
This seems to be improved in newer go-redis versions, but for the exact version you mentioned I would treat cross-shard |
0 replies
Answer selected by
ndyakov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For
github.com/go-redis/redis/v8 v8.11.0, no, not across different shards.I checked the cluster client code for that version. It computes the slot from the first key and sends the whole
MGETto a single node, so if the keys are in different slots Redis will returnCROSSSLOT.So for v8.11.0 your options are:
MGETorGETcallsThis seems to be improved in newer go-redis versions, but for the exact version you mentioned I would treat cross-shard
MGETas unsupported.