System Design · Junior · Question 46 of 75
Why is a cache like Redis in front of the database useful under high load?
- ✓Correct answer: Frequent requests are answered from memory, offloading the database
- 2Redis replaces the database, so there's no need to keep it
- 3Redis encrypts data, so the database becomes more secure
Explanation
Popular data (profiles, a catalog) is read from memory in fractions of a millisecond. The main difficulty is invalidation: when and how to update the cache after the data changes. Redis complements the main DB rather than replacing it.