1. What does a healthy Redis server reply to `PING`?
- OK
- ALIVE
- PONG
- ERROR
Show answer
Answer: PONG
`PING` is the standard liveness check and always returns `PONG`.
Lesson: redis-cli Basics
14 questions from the Redis Fundamentals: Caching, Data Structures and Persistence course, each with the correct answer and an explanation. Try to answer before you open the answer.
Answer: PONG
`PING` is the standard liveness check and always returns `PONG`.
Lesson: redis-cli Basics
Answer: SCAN
`SCAN` iterates incrementally without blocking the server; `KEYS *` blocks until the whole keyspace is scanned.
Lesson: Working with Keys
Answer: A numeric score attached to each member
Sorted sets rank members by their score, updated any time with `ZADD` or `ZINCRBY`.
Lesson: Sorted Sets
Answer: allkeys-lru
allkeys-lru removes the least recently used keys when maxmemory is reached.
Answer: Every app server can read the same shared, fast session store
A shared, low-latency store means any server can serve any user's session without stickiness.
Lesson: Session Storage
Answer: No — only currently connected subscribers get it
Pub/Sub has no storage — use Redis Streams when messages need to survive for offline consumers.
Lesson: Redis as a Message Broker
Answer: Sorted set
Sorted sets keep members ranked by score automatically.
Lesson: Redis as a Message Broker
Answer: SCAN
SCAN walks the keyspace in small non-blocking batches.
Lesson: Redis as a Message Broker
Answer: Stores the value and expires it after 60 seconds
EX sets the TTL in seconds together with the value.
Lesson: Redis as a Message Broker
Answer: The app reads the database and then fills the cache
The application owns loading data into the cache.
Lesson: Redis as a Message Broker
Answer: AOF
AOF replays commands to rebuild the dataset with minimal loss.
Lesson: Redis as a Message Broker
Answer: allkeys-lru
Evicting least recently used keys keeps hot data in memory.
Lesson: Redis as a Message Broker
Answer: It was designed for trusted networks and can be hijacked
Bind to private interfaces, require auth and use a firewall.
Lesson: Redis as a Message Broker
Answer: Streams
Streams (XADD/XREAD) retain messages for consumers that connect later.
Lesson: Redis as a Message Broker