Pipelining ngirim pirang-pirang perintah Redis ing siji round-trip jaringan saja tinimbang ngenteni jawaban saben perintah sadurunge ngirim sing sabanjure. Iki nambah throughput kanthi dramatis nalika ngeluarake pirang-pirang perintah, amarga latency jaringan — ora Redis dhewe — asring dadi bottleneck.
Masalahe: round-trip latency
Normally each command is a request→reply round-trip:
send GET → wait for reply → send GET → wait for reply → ... (N × network latency)
→ Redis processes each command in microseconds, but each round-trip adds network
latency (e.g. 0.5ms). For 1000 commands, that's ~500ms JUST in waiting!
Pipelining: batch-an perintah-perintahe
pipeline = redis.();
( id userIds) pipeline.();
results = pipeline.();
