Actually, we are fetching data from a Redis hash. But as the size of the data in the hash increases with time, a read timeout exception started coming. We are using Jedis as a client to connect to Redis from spring boot. So, what we want if, we can fetch the data in batches from the Redis itself. So, that the read timeout exception could be avoided. As, of now we have increased the timeout and things are working. But, it might fail in the future if load tend increase.
Asked
Active
Viewed 338 times
0
-
You should look into HSCAN and other SCAN-type operations. https://redis.io/commands/scan/ I've included a link to an old answer using Jedis that should get you on the right track. https://stackoverflow.com/a/33878416/4705248 – EddieDean May 19 '22 at 21:01
1 Answers
0
Yes, there is a way, redis offers the ability to send commands in bulk through the use of pipelines. If, apart from being sent in bulk, you need all the commands to be executed sequentially without interfering with others, redis also offers transactions.

rjlg99
- 1
- 2