Challenge - 5 Problems
Redis Key Naming Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
Why use colons in Redis key names?
In Redis, why do developers often use colons (:) in key names like
user:1001:profile?Attempts:
2 left
💡 Hint
Think about how colons help organize keys for easier management.
✗ Incorrect
Colons in Redis keys act like folders in a file system. They help group related keys, making it easier to find and manage them.
❓ query_result
intermediate1:30remaining
Find keys with a specific namespace
Given Redis keys:
user:1001:profile, user:1002:profile, order:5001:status, which command lists all keys related to users?Attempts:
2 left
💡 Hint
Use a pattern that matches keys starting with 'user:'
✗ Incorrect
The pattern user:* matches all keys that start with 'user:' which includes all user-related keys.
📝 Syntax
advanced2:00remaining
Identify the invalid Redis key name
Which of the following Redis key names is invalid or problematic due to naming conventions?
Attempts:
2 left
💡 Hint
Look for unusual or repeated colons that might cause confusion.
✗ Incorrect
Double colons :: can cause confusion or errors in key parsing and are generally avoided in Redis key naming.
❓ optimization
advanced2:30remaining
Optimizing Redis key design for large datasets
You have millions of user session keys like
session:userid:token. Which key naming strategy helps improve Redis performance and memory usage?Attempts:
2 left
💡 Hint
Shorter keys save memory and improve speed.
✗ Incorrect
Shorter keys reduce memory usage and improve Redis lookup speed, especially with large datasets.
🔧 Debug
expert3:00remaining
Troubleshoot key pattern matching issue
You want to delete all keys related to orders using
DEL order:* but it doesn't delete any keys. Why?Attempts:
2 left
💡 Hint
Think about how DEL works with patterns.
✗ Incorrect
The DEL command does not accept patterns. You must first get matching keys with KEYS and then delete them.