Redis (in-memory store).
The sticky-note wall by your desk for the things you grab constantly.
Your main records live in a big filing cabinet across the room. Accurate, roomy, but slow to walk to every time. For the handful of things you reach for constantly, you keep sticky notes on the wall right by your desk — grabbed in an instant.
Redis is that wall of sticky notes. It keeps data in memory instead of on disk, so reads and writes are measured in microseconds. It is most often used as a cache in front of a slower database, though it does much more than that.
- 1
The database is the filing cabinet across the room — reliable, but a walk every time.
- 2
Keep the hot items on a sticky-note wall right by your desk: in memory.
- Got it — instantly.3
Grab from the wall instantly — memory is thousands of times faster than disk.
- 4
It is just memory, though: fast, but limited in size and wiped on power loss.
- 5
It is more than a cache — counters, queues, leaderboards, rate limits all fit.
- 6
So you keep a copy in the cabinet too, and let the wall hold what’s hot.
Why memory changes everything
Reading from disk, even fast SSDs, is far slower than reading from RAM. By keeping data in memory, Redis answers in microseconds, which is why it sits in front of databases to absorb repeated reads. Put the result of an expensive query on the wall, and the next thousand requests skip the database entirely.
The trade-offs you manage
Memory is smaller and pricier than disk, so you keep only what is hot and let it expire. And because memory is volatile, a restart can lose data unless Redis is configured to persist snapshots or a log to disk. Treated as a cache, that is fine — the real data still lives in the database; the wall just makes the common case fast.