this post was submitted on 16 Sep 2026
30 points (100.0% liked)
Programming
28548 readers
361 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Redis is not a database. If you use it like one, it won't be long before you regret it.
Can I ask why? Are there errors in the append log? Does it forget things?
Not questioning your character. Just curious what your personal experiences were.
Technically, it shares a lot of characteristics with databases. You can put data in there and get data out again later, sure. But it's optimized for short term caching of data, to reduce load on a real database, reduce network requests, that kind of thing.
In programming you can often use tools in ways they were not intended for and it'll still work but the costs of that decision might not become apparent until much later. This is one of those. Over time you'll start to have issues with durability guarantees, complex querying and indexing, transactions and consistency, recovery after failure, backups and restoration, data growth, operational tooling, migrations and schema evolution, concurrency, debugging and observability. None of that shows up during initial development work so you won't notice until you're in way too deep.
So to answer the original question - use Redis AND MongoDB. For different things.
MongoDB is your database and Redis is the thing that stops you from needing to hit up the database all the time.
Reddis is an in memory cache. Your data will definitely get deleted from Reddis once the amount stored increases or even simply restarting the service. You need proper persistent storage as well so anything that's not in the cache can still be retrieved, albeit slower. Personally, I think NoSQL is overhyped and would recommend Postgres instead, unless your application has some very specific requirements.