Pipelining, birden çok Redis komutunu, her komutun yanıtını beklemeden tek bir ağ round-trip'inde gönderir. Çok sayıda komut gönderirken iş çıktısını dramatik şekilde iyileştirir, çünkü ağ gecikmesi — Redis değil — sıklıkla darboğazdır.
Sorun: round-trip gecikmesi
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: komutları grupla
pipeline = redis.();
( id userIds) pipeline.();
results = pipeline.();
