CodePark/ questions / Transactions, pipelining & Lua
START PRACTICINGPRACTICE
Backend question · Redis & caching › Transactions, pipelining & Lua

What does pipelining 1000 SET commands improve?

It reduces network round trips, so the batch finishes much faster

Pipelining sends commands one after another without waiting, then reads the replies together. So you pay about one round trip instead of 1000, and the batch finishes much faster. It does not give "It makes the 1000 commands atomic": other clients' commands can still run in between. For atomicity you need MULTI/EXEC or a Lua script.