All Questions
Caching medium

Redis processes commands on a single thread. What is the operational danger of running a command like `KEYS *` (or deleting a huge 2GB Set)?

  1. A It consumes an excessive amount of system RAM, potentially triggering an OOM (Out of Memory) crash of the primary Redis process.
  2. B It blocks the entire single-threaded event loop, preventing all other clients from performing any read or write operations during execution.
  3. C It creates a dangerous race condition with parallel background writes that can lead to partial data corruption within the keyspace.
  4. D It forces the Redis server to immediately flush all in-memory data to the disk-based persistent store, causing a massive I/O bottleneck.

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

Get the app

Related questions