All Questions
Redis hard

Why is calling non-deterministic functions like `TIME` or `RANDOMKEY` considered dangerous inside a Lua script when using standard statement-based replication?

  1. A The script will immediately crash if it detects any system-level library call that is not thread-safe.
  2. B Non-determinism causes data divergence because the Master and Replica nodes will generate different return values.
  3. C Lua does not support integer-based numerical precision, leading to rounding errors in high-velocity analytical queries.
  4. D External library calls bypass the internal Redis Lock Manager, potentially leading to hard system deadlocks.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions