0
  1. 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.

  2. If the above is possible then can I control how many keys are returned in each round-trip?

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

1 Answers1

1

I was able to find the answer for both my questions.

  1. Yes you can do this with Redisson. Rkeys.getKeys() does this fetching 10 keys at a time.
  2. To control the count, you can use Rkeys.getKeysByPattern(null, <count>). Rkeys.getKeys() internally uses Rkeys.getKeysByPattern(null, 10)
Anirudh Jayakumar
  • 1,171
  • 3
  • 15
  • 37