How to pipeline in node.js to redis?

后端 未结 4 803
余生分开走
余生分开走 2021-02-05 18:08

I have lot\'s of data to insert (SET \\ INCR) to redis DB, so I\'m looking for pipeline \\ mass insertion through node.js.

I couldn\'t find any good exa

4条回答
  •  日久生厌
    2021-02-05 18:34

    By default, node_redis, the Node.js library sends commands in pipelines and automatically chooses how many commands will go into each pipeline [(https://github.com/NodeRedis/node-redis/issues/539#issuecomment-32203325)][1]. Therefore, you don't need to worry about this. However, other Redis clients may not use pipelines by default; you will need to check out the client documentation to see how to take advantage of pipelines.

提交回复
热议问题