Is there a way to SCAN the keys iteratively without overloading the Redis cluster if the key size is really huge? Natively Redis supports this.
If the above is possible then can I control how many keys are returned in each round-trip?
Asked
Active
Viewed 1,620 times
0

Anirudh Jayakumar
- 1,171
- 3
- 15
- 37
1 Answers
1
I was able to find the answer for both my questions.
- Yes you can do this with Redisson.
Rkeys.getKeys()
does this fetching 10 keys at a time. - To control the count, you can use
Rkeys.getKeysByPattern(null, <count>)
.Rkeys.getKeys()
internally usesRkeys.getKeysByPattern(null, 10)

Anirudh Jayakumar
- 1,171
- 3
- 15
- 37