5 ms·
If your data has no value whatsoever, sure.
by himinlomax 5y ago
If your data has no value whatsoever, sure.
- gizdan 5y agoWhy? Redis has persistent data stores, and doesn't necessarily need to be memory only.
- himinlomax 5y agoWhen you commit to Postgres and the server acknowledges it, you know for sure that it's been written to disk and that it will survive anything but a hardware disk loss (or, obviously, system/FS bug). When clustering is enabled with synchronous writes, you can also be confident that the data has been recorded to another node as well. With redis clustering, there's no guarantee the data has been replicated. I'm not even sure there's any guarantee the data you just asked to be recorded be stored even once if a power outage happens immediately after the request.
- cheald 5y agoRedis can be made durable. The WAIT command allows you to guarantee writes to a quorum of nodes, and it can be configured for on-disk persistence rather easily. That said, due to it's single-threaded nature, blocking on quorum writes is likely to bottleneck your application under any kind of significant load. It really shines at volatile data, and while it can work for valuable data, there are better tools for the job.
- himinlomax 5y ago> Redis can be made durable Postgres, SQLite and many others are durable by default. Almost all so-called databases are like that. When you need a database, 90% of the time, you want durable. People make mistakes, developers are people, developers make mistakes, and one such mistake is assuming that Redis is like other databases in being durable by default when it's not. It's not conjecture, I've seen it done in production.
- YetAnotherNick 5y agoWhy does by default matters so much to you? Redis has persistence support and it can be easily turned on.
- himinlomax 5y agovi has persistence support