Phase 3Intermediate4 of 17 in Redis
Atomicity: Transactions, Lua, Functions & Pipelining
What's atomic in Redis and what's merely batched: MULTI/EXEC with WATCH, Lua scripts, Redis Functions, and pipelines, with the problem each one solves.
Single commands are atomic. The moment a feature needs "read, decide, write" across one or more keys, you need one of four tools: MULTI/EXEC, WATCH (optimistic locking), Lua scripts, or Redis Functions. Pipelining looks similar but gives no atomicity at all.
Interviewers love this area because it separates people who've used Redis from people who understand it: "Is a pipeline a transaction?", "Why can't MULTI make a decision?", "What happens if a Lua script runs for 10 seconds?"
0/5 · 0%
5 topics ~57 min 14 code blocks & diagrams