What is a key advantage of deploying Redis using a master-slave replication strategy?
Elimination of the need for data persistence.
Simplified data backup and recovery.
Automatic data sharding for horizontal scaling.
Improved write performance for high-traffic applications.
When integrating Redis as a cache layer with a database, what strategy ensures data consistency between the cache and the database?
All of the above
Read-through cache
Cache-aside pattern
Write-through cache
Which Redis data structure is particularly well-suited for implementing a real-time leaderboard with ranked scores?
List
Set
Sorted Set
String
What is a common pattern for achieving message persistence in Redis Pub/Sub?
Using Redis Streams alongside Pub/Sub.
Implementing a message queue system directly within Redis.
Relying on the inherent message durability of Pub/Sub.
Configuring Redis to use a disk-based persistence mode.
How are distances between geospatial points calculated in Redis?
Using the Haversine formula, accounting for Earth's curvature.
Using simple Euclidean distance.
Using Manhattan distance.
Distances are not calculated; only relative positions are stored.
A Redis key 'product:567' has a TTL of 60 seconds. What will be the TTL of this key after executing the command PERSIST product:567?
PERSIST product:567
0
-1
None of the above
60
You want a Redis key to expire in exactly one hour. Which command, along with the appropriate arguments, would you use?
PERSIST key 3600
EXPIRE key 3600
SETEX key 3600 value
TTL key 3600
How does containerization with Docker benefit Redis deployments?
It eliminates the need for configuring Redis persistence.
It enables running multiple Redis instances on a single port.
It automatically scales Redis instances based on real-time traffic.
It provides a consistent and isolated environment for Redis.
You have a key named 'temp:data' with an expiration time set. How would you remove the expiration time and make the key persist indefinitely?
There is no way to remove the expiration time once set
PERSIST temp:data
TTL temp:data -1
EXPIRE temp:data 0
What is a primary benefit of using Redis Hashes for storing related pieces of data instead of separate Strings?
Improved data security
Reduced memory footprint
Faster key lookups
Automatic data sorting