r/programming • u/javinpaul • Oct 20 '26
[ Removed by moderator ]
/r/programming/comments/1xavhns/removed_by_moderator/[removed] — view removed post
50
u/RipProfessional3375 Oct 20 '26
TLDR it's fast because by doing stuff in memory. Redis is like a mix of crack and magic to people who learn from the top down and know what these kinds of applications do without understanding the fundamentals.
Redis is faster than 'other databases' because the other databases really save the data to a physical disk somewhere and Redis main features only hold things in memory. Memory is really fast, but is lost when the power is cut.
Not a bad article though, it does explain some internal Redis mechanics to deal with the limitations of working with only memory.
4
u/1linux Oct 20 '26
Never lost any data with redis, since years. It makes memory dumps automatically.
32
u/Big_Combination9890 Oct 20 '26
And even if it did, no one would care. Redis is intended as a caching layer. If it is wiped on power loss, so what, cache empty -> grab info from storage, update cache, done.
6
u/dangerbird2 Oct 20 '26
Yeah, and you can also configure it to save an append-only log which gives you full replication to disk. Obviously, you aren't getting full ACID compliance like "real" databases, but durability really isn't an issue if you need it
27
u/HRApprovedUsername Oct 20 '26
Explains basic well known tool. Bad grammar in the title. I know what you are >.>
4
106
u/Big_Combination9890 Oct 20 '26
I'm gonna save you the read:
RAM is faster than Disk
Single thread doesn't have to wait for locks
Statistically correct is good enough for a cache
There. Summarized the entire article.