I'm reading that using Redis Pipeline could improve performance by sending a batch of commands to the Redis server rather than sending separate messages one by one which could add up in latency time. In this way, there is a rough correlation between the number of separate commands that you have in a pipeline batch and how much you improve in speed. My question is that, is there an overhead or a downside to using Redis Pipeline that would make it not worth it in certain situations, especially when there are just a few simple commands that are being executed not so often? I understand the actual improvement in these cases would be very marginal, but I'm wondering if using Pipeline could worsen the execution time actually by introducing some sort of overhead?
Asked
Active
Viewed 455 times
1 Answers
0
The overhead of pipeline is that Redis needs to queue replies for these piped commands before sending to client, i.e. cost memory. So, normally, you'd better not create a huge pipeline.
In your case, since your pipeline only has a few simple commands, it's not a problem.

for_stack
- 21,012
- 4
- 35
- 48