Skip to content
L
LearnCoachAssist
Topics
AI
AI Agents (500 Questions)
AI Math (500 Questions)
AI Math Beginner
AI Search Results
Claude Code Prompts
Art & Design
Art History
Color Theory
Graphic Design Principles
Knitting And Crochet
Photography Exposure Triangle And Composition
Business
Accounting Basics
Customer Research
Economics
Excel Formulas For Financial Analysts
Go To Market Strategy
Browse all topics →
Packs
Featured Packs
Python Programming Essentials
Prompt Engineering
Prompting Claude Code
AI Agents and Autonomous Systems
SQL and Database Fundamentals
JavaScript Fundamentals
Algorithms and Data Structures
Git and Version Control
Browse all packs →
Learn
Learning Paths
AI Deck Generator
How it works
Quiz
Blog
Cheat Sheets
Pricing
Resources
Pricing
Compare
FAQ
About
Contact
Effective Studying Guide
Free Anki Decks
Log in
Start Free
Topics
AI
AI Agents (500 Questions)
AI Math (500 Questions)
AI Math Beginner
AI Search Results
Claude Code Prompts
Art & Design
Art History
Color Theory
Graphic Design Principles
Knitting And Crochet
Photography Exposure Triangle And Composition
Business
Accounting Basics
Customer Research
Economics
Excel Formulas For Financial Analysts
Go To Market Strategy
Browse all topics →
Packs
Python Programming Essentials
Prompt Engineering
Prompting Claude Code
AI Agents and Autonomous Systems
SQL and Database Fundamentals
JavaScript Fundamentals
Algorithms and Data Structures
Git and Version Control
Browse all packs →
Learn
Learning Paths
AI Deck Generator
How it works
Quiz
Blog
Cheat Sheets
Pricing
Resources
Pricing
Compare
FAQ
About
Contact
Effective Studying Guide
Free Anki Decks
Start Free
Log in
← Quit
Redis Data Structures & Use Cases Practice Exam
Question
1
of
50
60:00
Question 1
Redis Data Structures & Use Cases
What is Redis Pub/Sub?
O(N) where N is the set size
A messaging model where publishers send to channels and subscribers receive in real time
Evicts the least frequently used keys (volatile-lfu or allkeys-lfu)
List
Question 2
Redis Data Structures & Use Cases
What is a Redis transaction?
A group of commands executed atomically using MULTI and EXEC, isolated from other clients
Milliseconds-time plus a sequence number for that millisecond
Returns write errors when memory is full instead of evicting any data
ZINCRBY
Question 3
Redis Data Structures & Use Cases
What backs a Redis geospatial index?
A listpack (previously ziplist)
A sorted set with latitude/longitude encoded as a 52-bit geohash score
Pub/Sub is fire-and-forget: messages are not stored and are lost without a subscriber
SETBIT
Question 4
Redis Data Structures & Use Cases
What command returns the length of a string value?
An append-only log data structure with consumer groups, message IDs, and acknowledgments
XADD
STRLEN
REmote DIctionary Server
Question 5
Redis Data Structures & Use Cases
What is Redis Sentinel?
A cursor-based iterator over the keyspace that does not block the server
Compacts the AOF file from the current dataset to keep it from growing unbounded
A built-in HA system that monitors masters/replicas and performs automatic failover
AOF with appendfsync always is stronger; RDB may lose the last seconds or minutes of writes
Question 6
Redis Data Structures & Use Cases
What does SUNIONSTORE do?
512 MB
Stores the union of multiple sets into a destination key
Replica nodes asynchronously copy data from a primary to provide read scaling and HA
The distance between two members of a geospatial index
Question 7
Redis Data Structures & Use Cases
What is the time complexity of LPUSH?
O(1)
Tagging, unique visitor tracking, and set-intersection recommendations
LPUSH inserts at the head (left); RPUSH inserts at the tail (right)
Records commands exceeding a configurable time threshold for diagnostics
Question 8
Redis Data Structures & Use Cases
What is the difference between SETEX and SET with PX?
A cursor-based iterator over the keyspace that does not block the server
HEXPIRE (Redis 7.4+)
SETEX takes seconds; SET ... PX takes milliseconds for finer TTL control
LPUSH new items and LTRIM to keep only the latest N items
Question 9
Redis Data Structures & Use Cases
How is Redis primarily classified architecturally?
GEOSEARCH (replaces GEORADIUS from Redis 6.2)
O(1) per key
A small string up to 44 bytes stored inline in the Redis object to save memory
An in-memory key-value data store used as a database, cache, and message broker
Question 10
Redis Data Structures & Use Cases
Which is the most basic Redis data type, storing a single binary-safe value per key?
Appends every write command to appendonly.aof, which is replayed at restart
REmote DIctionary Server
A group of commands executed atomically using MULTI and EXEC, isolated from other clients
String
Question 11
Redis Data Structures & Use Cases
What does OBJECT IDLETIME return?
The seconds since the last access of a stored object
Hashes use less memory and allow partial-field reads and writes
A sorted set with latitude/longitude encoded as a 52-bit geohash score
Atomically pops an element from one list and pushes it to another, with a configurable direction
Question 12
Redis Data Structures & Use Cases
Which command returns places within a given radius?
Durable, replayable messaging with per-consumer delivery and acknowledgment
3 masters with 1 replica each (6 nodes) for availability
A string value treated as an array of bits addressable by index via SETBIT/GETBIT
GEOSEARCH (replaces GEORADIUS from Redis 6.2)
Question 13
Redis Data Structures & Use Cases
Which Redis module provides Bloom and Cuckoo filters?
A sorted set with latitude/longitude encoded as a 52-bit geohash score
Returns 1 if the member is in the set, 0 otherwise
A probabilistic membership test with possible false positives but no false negatives
RedisBloom
Question 14
Redis Data Structures & Use Cases
What is the time complexity of ZADD?
REmote DIctionary Server
O(log N)
LPUSH inserts at the head (left); RPUSH inserts at the tail (right)
String
Question 15
Redis Data Structures & Use Cases
What is the maximum size of a single string value in Redis?
A substring within { } braces used by Cluster to force keys into the same slot
String
512 MB
XREAD
Question 16
Redis Data Structures & Use Cases
What does the volatile-lru policy do?
Evicts the least recently used keys among those with a TTL
Consuming a stream in a consumer group so each entry is delivered to only one consumer
Filters returned keys to a glob pattern
A native sharding solution that distributes keys across nodes using 16384 hash slots
Question 17
Redis Data Structures & Use Cases
Which command reads entries from one or more streams?
XREAD
About 0.81% standard error
SETBIT
A substring within { } braces used by Cluster to force keys into the same slot
Question 18
Redis Data Structures & Use Cases
How would you implement a recent-activity feed with a Redis List?
Returned when EVALSHA is called but the script is not in the cache; clients should fall back to EVAL
A skip list plus a hash table
LPUSH new items and LTRIM to keep only the latest N items
GEOADD
Question 19
Redis Data Structures & Use Cases
What does MGET do?
ZREVRANK
Returns the values of multiple keys in a single round trip
Snapshot after 1 hour if ≥1 change, after 5 min if ≥100, after 1 min if ≥10000
Acknowledges processing of a stream entry so it can be trimmed or deleted
Question 20
Redis Data Structures & Use Cases
What is the difference between HGETALL and HVALS?
Records commands exceeding a configurable time threshold for diagnostics
A listpack (previously ziplist)
MOVED is permanent and points to the slot's owner; ASK is a transient hint during slot migration
HGETALL returns fields and values; HVALS returns only values
Question 21
Redis Data Structures & Use Cases
Which command atomically sets a value only if the key already exists?
O(1) per element added
SET key value XX
Pub/Sub is fire-and-forget: messages are not stored and are lost without a subscriber
Both are atomic, but Lua supports conditional logic and complex cross-key operations
Question 22
Redis Data Structures & Use Cases
What is a Redis HyperLogLog used for?
Counting unique items with a fixed 12 KB footprint regardless of cardinality
Point-in-time snapshots are written to dump.rdb at configured intervals
LPUSH new items and LTRIM to keep only the latest N items
Evicts the least frequently used keys (volatile-lfu or allkeys-lfu)
Question 23
Redis Data Structures & Use Cases
What does used_memory represent?
AOF with appendfsync always is stronger; RDB may lose the last seconds or minutes of writes
The total bytes Redis has allocated to store data, including overhead
Storing object attributes (e.g., user, product, session) under one key
SRANDMEMBER
Question 24
Redis Data Structures & Use Cases
What is a typical use case for Redis Bitmaps?
A substring within { } braces used by Cluster to force keys into the same slot
String
6379
Daily active user tracking, feature flags, or boolean state per user
Question 25
Redis Data Structures & Use Cases
What is a NOSCRIPT error?
A small string up to 44 bytes stored inline in the Redis object to save memory
LLEN
Returned when EVALSHA is called but the script is not in the cache; clients should fall back to EVAL
BRPOP or BLPOP
Question 26
Redis Data Structures & Use Cases
What command returns random members from a set without removing them?
Consuming a stream in a consumer group so each entry is delivered to only one consumer
LPUSH inserts at the head (left); RPUSH inserts at the tail (right)
A messaging model where publishers send to channels and subscribers receive in real time
SRANDMEMBER
Question 27
Redis Data Structures & Use Cases
Which command subscribes to messages matching a glob pattern?
Evicts the key with the shortest remaining TTL among keys that have one
Returns 1 if the member is in the set, 0 otherwise
PSUBSCRIBE
HDEL
Question 28
Redis Data Structures & Use Cases
What is the time complexity of HGET?
Returns the data type stored at a key (string, list, set, zset, hash, stream)
O(1)
Removes elements outside the specified index range, modifying the list in place
SETNX is the legacy form; SET ... NX is the modern atomic form that also supports expiration
Question 29
Redis Data Structures & Use Cases
Which command appends an entry to a stream?
The total bytes Redis has allocated to store data, including overhead
Avoiding expensive database lookups for likely-nonexistent keys (e.g., username or cache-miss checks)
Removes elements outside the specified index range, modifying the list in place
XADD
Question 30
Redis Data Structures & Use Cases
What does the allkeys-lru policy do?
Evicts the least recently used keys regardless of TTL
O(N + log M) where N is items in the radius and M is the total
Pub/Sub is fire-and-forget: messages are not stored and are lost without a subscriber
Removes elements outside the specified index range, modifying the list in place
Question 31
Redis Data Structures & Use Cases
What is the structure of a Redis Stream entry ID?
Milliseconds-time plus a sequence number for that millisecond
An in-memory key-value data store used as a database, cache, and message broker
Atomically sets a key to a new value and returns the previous one
Store timestamps as scores; use ZREMRANGEBYSCORE to drop old entries and ZCARD to count recent ones
Question 32
Redis Data Structures & Use Cases
What is a Redis Bitmap?
A string value treated as an array of bits addressable by index via SETBIT/GETBIT
SRANDMEMBER does not remove the element; SPOP removes and returns it
GEOSEARCH (replaces GEORADIUS from Redis 6.2)
Appends every write command to appendonly.aof, which is replayed at restart
Question 33
Redis Data Structures & Use Cases
What command removes one or more fields from a hash?
HDEL
Replica nodes asynchronously copy data from a primary to provide read scaling and HA
Sorted Set (ZSET)
SETNX is the legacy form; SET ... NX is the modern atomic form that also supports expiration
Question 34
Redis Data Structures & Use Cases
Why prefer a Hash over many String keys for an object?
GEOADD
Tagging, unique visitor tracking, and set-intersection recommendations
Hashes use less memory and allow partial-field reads and writes
O(N) where N is the set size
Question 35
Redis Data Structures & Use Cases
Which Redis type stores an unordered collection of unique strings?
About 0.81% standard error
Set
The total bytes Redis has allocated to store data, including overhead
String
Question 36
Redis Data Structures & Use Cases
What is the difference between SETNX and SET with the NX option?
Durable, replayable messaging with per-consumer delivery and acknowledgment
SETNX is the legacy form; SET ... NX is the modern atomic form that also supports expiration
A listpack (previously ziplist)
Sorted Set (ZSET)
Question 37
Redis Data Structures & Use Cases
What is the purpose of XACK?
LPUSH to enqueue and BRPOP to dequeue gives a simple message queue
HGETALL returns fields and values; HVALS returns only values
All fields and values in the hash as a flat list
Acknowledges processing of a stream entry so it can be trimmed or deleted
Question 38
Redis Data Structures & Use Cases
What is the difference between KEYS and SCAN?
KEYS returns all matches in one blocking call; SCAN iterates in small batches and is safe on large datasets
Acknowledges processing of a stream entry so it can be trimmed or deleted
An append-only log data structure with consumer groups, message IDs, and acknowledgments
Subscribe to __keyevent@0__:expired (or the relevant db index)
Question 39
Redis Data Structures & Use Cases
Which Redis type maps field-value pairs within a single key?
C
All fields and values in the hash as a flat list
ZINCRBY
Hash
Question 40
Redis Data Structures & Use Cases
What is the purpose of the TYPE command?
Runs a previously cached Lua script by its SHA1 hash to avoid resending the script body
Returns write errors when memory is full instead of evicting any data
Acknowledges processing of a stream entry so it can be trimmed or deleted
Returns the data type stored at a key (string, list, set, zset, hash, stream)
Question 41
Redis Data Structures & Use Cases
What is Redis replication?
About 0.81% standard error
SETBIT
Replica nodes asynchronously copy data from a primary to provide read scaling and HA
SRANDMEMBER does not remove the element; SPOP removes and returns it
Question 42
Redis Data Structures & Use Cases
What does SDIFF return?
The set of members in the first set that are not in the others
SRANDMEMBER
SETEX takes seconds; SET ... PX takes milliseconds for finer TTL control
LPUSH new items and LTRIM to keep only the latest N items
Question 43
Redis Data Structures & Use Cases
Which command returns the rank of a member with 0 meaning the highest score?
A probabilistic membership test with possible false positives but no false negatives
ZREVRANK
O(1) per key
SETNX is the legacy form; SET ... NX is the modern atomic form that also supports expiration
Question 44
Redis Data Structures & Use Cases
What underlying structure backs a small Redis list?
Snapshot after 1 hour if ≥1 change, after 5 min if ≥100, after 1 min if ≥10000
AOF with appendfsync always is stronger; RDB may lose the last seconds or minutes of writes
noeviction
A listpack (previously ziplist)
Question 45
Redis Data Structures & Use Cases
What is a Redis keyspace notification?
Both are atomic, but Lua supports conditional logic and complex cross-key operations
HGETALL returns fields and values; HVALS returns only values
An event published on a channel when a key is created, modified, expired, or evicted
SETNX is the legacy form; SET ... NX is the modern atomic form that also supports expiration
Question 46
Redis Data Structures & Use Cases
Which command returns server statistics and configuration?
INFO
A string value treated as an array of bits addressable by index via SETBIT/GETBIT
APPEND
The seconds since the last access of a stored object
Question 47
Redis Data Structures & Use Cases
What does the GETSET command do?
A skip list plus a hash table
Atomically sets a key to a new value and returns the previous one
Redis returns an error
Returns the values of multiple keys in a single round trip
Question 48
Redis Data Structures & Use Cases
What is the main limitation of Pub/Sub compared to Streams?
The internal encoding of a key, e.g., embstr, int, listpack, skiplist, or hashtable
Returns the values of multiple keys in a single round trip
Pub/Sub is fire-and-forget: messages are not stored and are lost without a subscriber
The set of members in the first set that are not in the others
Question 49
Redis Data Structures & Use Cases
What is a typical use case for Redis Hashes?
SMEMBERS returns the full set in one call; SSCAN iterates incrementally with a cursor, avoiding blocking on large sets
The seconds since the last access of a stored object
Storing object attributes (e.g., user, product, session) under one key
XADD
Question 50
Redis Data Structures & Use Cases
What is the difference between ZRANGE and ZRANGEBYSCORE?
ZRANGE selects by index range; ZRANGEBYSCORE selects by score range
The seconds since the last access of a stored object
Returned when EVALSHA is called but the script is not in the cache; clients should fall back to EVAL
The set of members in the first set that are not in the others
Question navigator
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
← Previous
Next →
✅ Submit Exam