What is the role of replication in a Redis Cluster?
To enhance data security by encrypting data across multiple nodes.
To optimize read operations by caching frequently accessed data on multiple nodes.
To provide fault tolerance and ensure data availability in case of node failures.
To improve write performance by distributing write operations.
Which design pattern in Redis is MOST suitable for representing a queue-like structure with efficient push and pop operations?
Sorted Set
List
HyperLogLog
Set
How can Redis be used effectively with a NoSQL database like MongoDB?
For storing real-time metrics and counters related to MongoDB operations.
All of the above
For implementing distributed locking mechanisms for concurrent MongoDB updates.
As a caching layer for frequently accessed MongoDB documents.
In which scenario would you choose Kafka over Redis Streams for integrating with your application?
When you require strict message ordering guarantees within a consumer group.
When handling extremely high throughput message ingestion (millions of messages per second).
When your application needs to replay past events or access historical data.
What is a common pattern for achieving message persistence in Redis Pub/Sub?
Configuring Redis to use a disk-based persistence mode.
Implementing a message queue system directly within Redis.
Using Redis Streams alongside Pub/Sub.
Relying on the inherent message durability of Pub/Sub.
In Redis Cluster, what happens if a node holding a primary key fails?
The cluster becomes inaccessible until the failed node is restored.
A replica of the failed node is promoted to master, ensuring data availability.
Data on the failed node is lost permanently.
All other nodes in the cluster take over the data from the failed node.
How do subscribers express interest in receiving messages from specific channels?
By writing a Lua script that listens for messages on the channel.
By executing the SUBSCRIBE command with the channel name.
SUBSCRIBE
By establishing a direct connection to the publisher.
By setting a special key in Redis with the channel name.
What type of data structure is used internally by Redis Geospatial Indexes?
Hash
Bitmap
How does the WATCH command help in implementing optimistic locking in Redis?
WATCH
It sets a time-to-live (TTL) on the watched keys.
It monitors the watched keys for changes by other clients.
It acquires an exclusive lock on the watched keys.
It prevents other clients from reading the watched keys.
Which Redis command is used to retrieve geospatial points within a specified radius?
GEOSEARCH
GEOADD
GEORADIUS
GEODIST