Redis 管道(Pipelining)
管道是一种几十年来广泛使用的技术。一次请求/响应服务器就可以将多个命令发送到服务器,而不用等待回复,最后在一个步骤中读取该答复。
$ (printf "PING\r\nPING\r\nPING\r\n"; sleep 1) | nc localhost 6379
+PONG
+PONG
+PONG
有密码的redis服务器
printf " auth 123456 \r\n PING \r\n" | nc localhost 6379