At my last company, we used redis both for celery as a queue, and a cache for values we needed to call often and retrieve quickly. We ALSO used Mongo, but moreso as a store for larger documents that were called less frequently. I think it's not fair to compare them directly together, they are each useful in their own specific cases.
The way I look at Redis is a service that helps to off-load main db. Obvious example is how people use it as a cache. But it has other use, such as:
- Leaderboard: Redis shines when we need to store ranking data.
- Geo Query: Instead of query geo spatial index directly from MongoDB. I use Redis and feed the id back into MongoDB
- Track Occurence Of Event: Let's say we need to keep track state of an user
- Set of data
In other words, I treat Redis as a network/distributed data structure, which I can implement in the main db, but will require heavy read/write.
What is a cache vs a database? You can use mysql as a cache. Most people would call it a database.
Really this article is dumb. I think almost never would you need to choose redis vs mongo.
Redis is a weird and hard to describe product. For example you can use it as a queue over rabbitmq with celery. Or a cache with all kinds of things. But it does more. And an empty instance runs in like 3mb of ram and handles thousands of connections.
[+] [-] crack-the-code|8 years ago|reply
[+] [-] gshakir|8 years ago|reply
[+] [-] kureikain|8 years ago|reply
- Leaderboard: Redis shines when we need to store ranking data. - Geo Query: Instead of query geo spatial index directly from MongoDB. I use Redis and feed the id back into MongoDB - Track Occurence Of Event: Let's say we need to keep track state of an user - Set of data
In other words, I treat Redis as a network/distributed data structure, which I can implement in the main db, but will require heavy read/write.
[+] [-] unknown|8 years ago|reply
[deleted]
[+] [-] olingern|8 years ago|reply
[+] [-] mcanon7|8 years ago|reply
[+] [-] codedokode|8 years ago|reply
[+] [-] brianwawok|8 years ago|reply
Really this article is dumb. I think almost never would you need to choose redis vs mongo.
Redis is a weird and hard to describe product. For example you can use it as a queue over rabbitmq with celery. Or a cache with all kinds of things. But it does more. And an empty instance runs in like 3mb of ram and handles thousands of connections.
[+] [-] pvdebbe|8 years ago|reply
[+] [-] Hackthepack|8 years ago|reply
[+] [-] ninjazee124|8 years ago|reply
[+] [-] gonyea|8 years ago|reply
[+] [-] lloydjatkinson|8 years ago|reply
[+] [-] yanivleven|8 years ago|reply
[deleted]
[+] [-] mcanon7|8 years ago|reply
[+] [-] sidegrid|8 years ago|reply