gpt4 book ai didi

node.js - 什么是 node_redis 中的流水线?

转载 作者:IT王子 更新时间:2023-10-29 05:57:49 27 4
gpt4 key购买 nike

node_redis

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

我自己在写程序,所以这里是什么意思?这是否意味着简单的非阻塞

最佳答案

那是 node.js 相关的,而是 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

关于node.js - 什么是 node_redis 中的流水线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13050656/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com