Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well, if you have only a single instance that doesn't support threading it is trivial to get those properties, but what about durability? Do you realize you store all of the data in the RAM?


Redis can dump and fsync data to disk WAL every query, and can run multiple commands in a transaction, so it can provide the highest guarantees possible for a database.

The catch is that the data must fit in RAM, you can only use 1 core for query processing, there is no support for long-lived transactions and no built-in SQL support.

Obviously in an ideal world something like Redis would be useless since proper databases would cover all use cases, but unfortunately the state of database software is disastrous.


This is your second comment in this thread about Redis being in-memory. Redis can function in-memory only but it also has at least 2 persistence stories (rdb snapshots, aof logs), and out of the box is configured use rdb.


Your data still has to fit in memory though.


Redis got a feature called AOF, I use it for every single command to save the command history to disk.

This does obviously decrease write performance of the Redis quite a bit, but read performance is mostly fine.

It is all about how many writes versus reads you expect per second. My system expects at most 1 write per sec vs 100 reads, so performance is fine and this way it is ACID compliant.


RAM is cheap and lots of realistic data sets never exceed some tens of GBs, even in extreme scenarios. What's wrong with keeping (a copy of) all data in RAM? It's what makes Redis fast yet simple.


Nothing wrong if it is a cache, I would have problem using it as a primary data store for important data as many do.


Here's a terrifying secret for you: if a dataset is small enough and used intensively enough, SQL databases like PostgreSQL will eventually have all of it in RAM. Better ditch those too!


why? what is wrong with the persistence mechanisms it has?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: