Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's pipelining in node_redis?

node_redis states

The performance of node_redis improves dramatically with pipelining, which happens automatically in most normal programs.

I'm writing the program myself, so what's meant here? Does that mean simply non-blocking?

like image 730
shredding Avatar asked Oct 24 '12 13:10

shredding


1 Answers

That's not node.js related but redis.

A Request/Response server can be implemented so that it is able to process new requests even if the client didn't already read the old responses. This way it is possible to send multiple commands to the server without waiting for the replies at all, and finally read the replies in a single step.

This is called pipelining, and is a technique widely in use since many decades. For instance many POP3 protocol implementations already supported this feature, dramatically speeding up the process of downloading new emails from the server.

Redis supports pipelining since the very early days, so whatever version you are running, you can use pipelining with Redis. This is an example using the raw netcat utility:

http://redis.io/topics/pipelining

like image 118
Prinzhorn Avatar answered Sep 20 '22 16:09

Prinzhorn