← All interview questions

Skill Zuno · skillzunos.com · Fullstack

Redis interview questions

Prepare for Redis interviews on Skill Zuno. This practice book covers Redis interview questions across New, Easy, Medium, Hard, and Diff levels so you can work through real interview-style problems on skillzunos.com.

Open Redis on Skill Zuno

Also see the Redis tutorial.

Redis is an in-memory data store used as a cache, message broker, session store and fast database. It offers data structures such as strings, hashes, lists, sets, sorted sets and streams, with optional persistence to disk. Redis interviews cover data types, expiry and eviction, persistence, caching patterns, pub/sub, replication and clustering.

Sample Redis interview questions

Why is Redis so fast?

Data lives in memory, commands are simple operations on efficient data structures, and a single-threaded event loop avoids locks and context switches. Since Redis 6, network I/O can also use extra threads.

What is the difference between RDB and AOF persistence?

RDB writes point-in-time snapshots, which are compact and quick to restore but lose writes since the last snapshot. AOF logs every write and can fsync every second, losing at most about a second of data. Many setups use both.

What happens when Redis runs out of memory?

It follows maxmemory-policy. noeviction rejects writes; allkeys-lru or allkeys-lfu evict any key; volatile-* policies evict only keys that have a TTL.

How would you build a leaderboard in Redis?

Use a sorted set: ZADD or ZINCRBY to update scores, ZREVRANGE (or ZRANGE with REV) to fetch the top players, and ZREVRANK for a player's position, all in logarithmic time.

How does Redis Cluster distribute keys?

Redis Cluster splits the key space into 16,384 hash slots spread across primary nodes. A key's slot is CRC16 of the key modulo 16384, and hash tags such as {user1} keep related keys in the same slot.

What you can practice

  • Redis interview questions for beginners and experienced developers
  • Level-based practice: New, Easy, Medium, Hard, and Diff
  • Fullstack topics alongside Redis on skillzunos.com

More Fullstack interview questions

All interview questions