


Prepare for Redis interviews with 600 carefully structured multiple-choice questions across six focused practice tests. This Redis Interview Questions course is built for developers and engineers who want more than command memorisation: it helps you practise the technical judgment expected in real backend, DevOps, platform engineering, and system-design interviews.
You will begin with Redis fundamentals, core commands, key management, Strings, Hashes, Lists, Sets, Sorted Sets, and expiration. From there, you will tackle advanced Redis data structures including Bitmaps, HyperLogLogs, Streams, consumer groups, and reliable event-processing patterns. The course also covers memory management, maxmemory policies, TTL behavior, eviction, RDB snapshots, AOF persistence, recovery, and production reliability.
As you progress, the questions become more scenario-driven. You will practise Redis transactions, WATCH, Lua scripting, Functions, pipelining, Pub/Sub, rate limits, distributed locks, and idempotent event processing. Advanced tests challenge you on replication, Sentinel, Redis Cluster, hash slots, failover, consistency, hot keys, security, ACLs, TLS, monitoring, capacity planning, and production troubleshooting.
Every question includes an explanation to reinforce the reasoning behind the correct answer and clarify why alternatives are unsuitable. The goal is to help you recognise the patterns interviewers test: selecting the right data structure, protecting a production deployment, designing reliable real-time workflows, and making sound trade-offs under load.
Use these practice tests to identify knowledge gaps, sharpen your Redis interview answers, and build confidence for technical assessments and real-world Redis discussions.
Purpose
Designed to strengthen both theoretical Redis knowledge and practical interview readiness through a balanced combination of conceptual, definition-based, application-oriented, and real-world interview questions.
Difficulty Distribution
30% Fundamental Concepts & Definitions: Redis architecture, core commands, key management, Strings, Hashes, Lists, Sets, Sorted Sets, TTLs, and data-structure behavior.
30% Applied & Scenario-Based Questions: Caching, queues, Streams, consumer groups, rate limits, persistence choices, memory policies, pipelining, and Lua workflows.
40% Advanced Interview Challenges: Replication consistency, Sentinel, Redis Cluster, hash slots, failover, ACLs, performance troubleshooting, recovery, and production architecture.
Test 1
Test Name: Redis Fundamentals & Core Data Types
Covered Chapters: Chapter 1 – Redis Fundamentals & In-Memory Data Store Concepts + Chapter 2 – Redis Data Types, Commands & Key Management
Difficulty Level: Beginner
Test 2
Test Name: Redis Data Structures & Advanced Data Types
Covered Chapters: Chapter 3 – Redis Strings, Lists, Sets & Sorted Sets + Chapter 4 – Redis Hashes, Bitmaps, HyperLogLogs & Streams
Difficulty Level: Beginner to Intermediate
Test 3
Test Name: Redis Memory Management & Persistence
Covered Chapters: Chapter 5 – Redis Expiration, TTL & Memory Management + Chapter 6 – Redis Persistence, RDB & AOF
Difficulty Level: Intermediate
Test 4
Test Name: Redis Transactions, Scripting & Event-Driven Architecture
Covered Chapters: Chapter 7 – Redis Transactions, Pipelining & Lua Scripting + Chapter 8 – Redis Pub/Sub, Streams & Event-Driven Architecture
Difficulty Level: Intermediate to Advanced
Test 5
Test Name: Redis High Availability & Distributed Architecture
Covered Chapters: Chapter 9 – Redis Replication, High Availability & Sentinel + Chapter 10 – Redis Cluster, Sharding & Distributed Architecture
Difficulty Level: Advanced
Test 6
Test Name: Redis Security, Performance & Real-Time Challenges
Covered Chapters: Chapter 11 – Redis Security, Performance Tuning & Production Management + Chapter 12 – Real-Time Redis Scenarios & Senior-Level Interview Challenges
Difficulty Level: Advanced to Expert
STOP HERE — Waiting for your approval.
Featured Interview Questions
1. During an interview, how should you accurately describe Redis?
Options:
A. An in-memory data structure server that can persist data
B. A relational database designed for joins
C. A distributed file system for large files
D. A queue-only message broker
ANS: A. An in-memory data structure server that can persist data
Explanation:
Redis primarily serves data from memory.
It provides rich data structures, not just simple key-value storage.
Redis can persist data using RDB and/or AOF.
It is not a relational SQL database.
Messaging is supported, but it is not Redis’s only purpose.
2. Which trade-off should an interviewer expect you to mention when choosing HyperLogLog over a Set?
Options:
A. HyperLogLog retains insertion order
B. HyperLogLog supports exact membership checks
C. HyperLogLog provides approximate, not exact, distinct counts
D. HyperLogLog supports per-member TTLs
ANS: C. HyperLogLog provides approximate, not exact, distinct counts
Explanation:
HyperLogLog is memory-efficient because it estimates cardinality.
Its counts have a small approximation error.
It does not preserve insertion order.
It cannot check whether a specific member exists.
Redis does not support member-level TTLs here.
3. Which Redis structure is the best fit for an audit trail where events must be replayed in order by multiple independent consumer groups?
Options:
A. List
B. Sorted Set
C. Hash
D. Stream
ANS: D. Stream
Explanation:
Redis Streams provide ordered, persistent event entries with IDs.
Multiple consumer groups can process the same Stream independently.
Lists do not provide consumer-group pending tracking.
Sorted Sets order by score rather than log-delivery semantics.
Hashes are records, not append-only audit logs.
4. Under volatile-lru, which keys are candidates for eviction when maxmemory is reached?
Options:
A. Only keys without TTLs
B. Only keys that have an expiration
C. Only hash fields with an expiration
D. All keys, regardless of TTL
ANS: B. Only keys that have an expiration
Explanation:
volatile-lru considers only keys with an expiration set.
Persistent keys are protected from eviction by that policy.
Redis does not evict individual hash fields through normal key eviction.
allkeys-lru is the policy that considers all keys.
Choose volatile policies only when expiring keys are intentionally the disposable dataset.
5. A payment workflow queues DECR balance and HSET order status paid before calling EXEC. What does EXEC provide?
Options:
A. Executes the queued commands sequentially as one atomic transaction
B. Sends all commands in a single network packet only
C. Retries failed commands automatically
D. Rolls back every command if one command returns an error
ANS: A. Executes the queued commands sequentially as one atomic transaction
Explanation:
EXEC runs queued transaction commands atomically.
Other clients do not observe intermediate transaction states.
It does not itself provide packet batching only.
It does not retry commands automatically.
Runtime command errors do not roll back earlier commands.
6. An interviewer asks for the strongest summary of choosing Transactions, Lua, Pub/Sub, and Streams. Which answer is best?
Options:
A. Use Pub/Sub for every durable workflow
B. Use Lua only for long-running background jobs
C. Use transactions whenever external systems need rollback
D. Use transactions or Lua for atomic Redis logic, Pub/Sub for ephemeral fan-out, and Streams for durable event processing
ANS: D. Use transactions or Lua for atomic Redis logic, Pub/Sub for ephemeral fan-out, and Streams for durable event processing
Explanation:
Transactions and Lua solve atomic Redis-side coordination.
Pub/Sub is ideal for live, ephemeral fan-out.
Streams retain events with consumer-group recovery features.
External rollback needs application-level workflow design.
Choosing by delivery and atomicity requirements is interview-ready reasoning.
7. A write succeeds on a Redis primary, but a replica has not yet received it. What consistency model does this demonstrate?
Options:
A. Linearizable consistency
B. Eventual consistency between primary and replica
C. Serializable isolation across all clients
D. Synchronous quorum replication
ANS: B. Eventual consistency between primary and replica
Explanation:
Redis replication is asynchronous by default, so a replica can temporarily lag behind the primary.
This produces eventual consistency for reads served from replicas.
Linearizable and synchronous-quorum guarantees are not default Redis replication behavior.
Serializable isolation describes transaction semantics, not replication delivery timing.
In production, route read-after-write paths to the primary when freshness matters.
8. What is the main purpose of Redis Cluster hash tags such as {user:42} and {user:42}?
Options:
A. Force related keys into the same slot
B. Encrypt the key names
C. Replicate keys to every primary
D. Prevent key expiration
ANS: A. Force related keys into the same slot
Explanation:
Hash tags force Redis Cluster to hash only the content inside {} for slot selection.
Keys with the same tag land in the same slot and can participate in multi-key operations.
They do not encrypt keys, replicate data globally, or affect TTL behavior.
Overusing one tag can create hot slots and uneven distribution.
Choose tags around transaction boundaries, such as a tenant or user aggregate.
9. A service only needs to read keys beginning with catalog:. Which ACL approach is safest?
Options:
A. Allow all commands and rely on application validation
B. Allow +@all with a strong password
C. Allow read commands and ~catalog:* key pattern
D. Allow only CONFIG and KEYS
ANS: C. Allow read commands and ~catalog:* key pattern
Explanation:
Key patterns and command categories should match the service’s actual duty.
~catalog:* scopes accessible keys to the intended namespace.
Allowing all commands violates least privilege.
CONFIG is administrative, and KEYS can be dangerous in production.
Review ACL logs and permissions whenever service responsibilities change.
10. Which design best implements an atomic fixed-window rate limit in Redis?
Options:
A. Use GET then increment in application memory
B. Run KEYS before each request
C. Use a separate Redis database per user
D. Use a Lua script that increments and sets TTL when the key is first created
ANS: D. Use a Lua script that increments and sets TTL when the key is first created
Explanation:
Lua executes atomically with respect to other Redis commands.
The script can increment a counter and set expiry only on first use.
Application-side read-modify-write introduces race conditions.
Scanning keys or creating databases per user is inefficient and unnecessary.
For smoother limits, consider a sliding-window or token-bucket algorithm.