TikTok·Software Engineer·Onsite - System Design / Architecture
- Walk me through Redis's core data structures and their time and space complexity characteristics.
- Compare RDB and AOF persistence in Redis. What are the durability, performance, and recovery trade-offs?
- How do Redis eviction policies work, and what happens to keys with TTLs when the instance is under memory pressure?
- Explain how Redis replication works, how Sentinel handles failover, and how Cluster handles sharding.
- What are the limitations of Redis transactions and Lua scripting, and what are the common pitfalls when implementing distributed locks?
- How would you prevent a cache stampede, and what strategies exist for handling hotspot keys in Redis?
“Covered strings, lists, sets, sorted sets, hashes, and streams.”