Start here. This is the direct spoken answer to practice first.
Overview
Distinguishes fewer network round trips from atomic execution and chooses the smallest correct Redis primitive.
A pipeline batches commands so the client sends them with fewer network round trips; batching alone is a performance feature, not an atomicity guarantee. In redis-py, a transactional pipeline uses MULTI and EXEC so queued commands execute without another client interleaving them. WATCH adds optimistic concurrency by aborting when watched keys change. A Lua script can perform a conditional multi-step operation atomically on the Redis server.