Q11 Redis Domain 2 · 25–30% of exam Priority · Real Exam

Why is the KEYS command discouraged in production?

  1. A It requires admin privileges
  2. B It blocks the single-threaded server while scanning the entire keyspace (correct answer)
  3. C It returns only 10 results
  4. D It is deprecated

Shortcut: Redis executes commands on one thread. KEYS scans every key, stalling all other traffic. SCAN iterates incrementally with a cursor and should be used instead.