Redis pipe (Pipelining)

One can send multiple commands to the server without waiting for a reply, and finally read the answer in one step.

Saving round-trip time RTT (Round Trip Time - round-trip time).

1. Installation nc: yum install nc -y

2. redis connected via nc: nc localhost 6379

3. Send via echo to the nc command: echo -e "set k1 99 \ nincr k1 \ n get k1" | nc localhost 6379

(By newline \ n spaced between command)

 

Published 48 original articles · won praise 1 · views 2816

Guess you like

Origin blog.csdn.net/Forest24/article/details/102801419