What is the primary purpose of using MULTI and EXEC commands in Redis?
MULTI
EXEC
To set a key-value pair with an expiration time.
To create a new Redis database.
To retrieve multiple keys simultaneously.
To execute multiple commands atomically.
Which configuration parameter in the redis.conf file is crucial for enabling Redis Cluster mode?
redis.conf
appendonly
cluster-config-file
cluster-node-timeout
cluster-enabled
In a Redis Cluster, how is data distributed across the nodes?
Data is distributed using consistent hashing based on a key's hash slot.
Data is replicated to all nodes for high availability.
Data is manually partitioned by the user during setup.
Data is randomly assigned to any node.
What is a 'hash slot' in the context of Redis Cluster?
A security feature that encrypts data before storing it in the cluster.
A type of data structure that stores key-value pairs using a hash function.
A virtual slot used to determine data distribution across the cluster.
A physical slot on the Redis server where data is stored.
What is a potential downside of using Redis as a primary database for your application?
All of the above
Redis' in-memory nature means data persistence relies on disk or replication, introducing potential data loss risks.
Redis does not support complex queries or joins like traditional SQL databases.
Redis has limited data modeling capabilities compared to document-oriented or relational databases.
In Redis Cluster, what happens if a node holding a primary key fails?
A replica of the failed node is promoted to master, ensuring data availability.
Data on the failed node is lost permanently.
The cluster becomes inaccessible until the failed node is restored.
All other nodes in the cluster take over the data from the failed node.
How does containerization with Docker benefit Redis deployments?
It provides a consistent and isolated environment for Redis.
It enables running multiple Redis instances on a single port.
It automatically scales Redis instances based on real-time traffic.
It eliminates the need for configuring Redis persistence.
What Redis data structure would be MOST efficient for storing a user's session data with an expiry time?
List
String
Hash
Set
What is the minimum number of Redis nodes required to create a functional Redis Cluster?
6
2
1
3
How are distances between geospatial points calculated in Redis?
Using Manhattan distance.
Distances are not calculated; only relative positions are stored.
Using simple Euclidean distance.
Using the Haversine formula, accounting for Earth's curvature.