4 ms·
Data loss can occur between flushes to disk, for example (by default every 2 seconds / every I_FORGOT megabytes). Perhaps (most likely) it is possible to fine-t
by arpa 5y ago
Data loss can occur between flushes to disk, for example (by default every 2 seconds / every I_FORGOT megabytes). Perhaps (most likely) it is possible to fine-tune the configuration to have redis as a very reliable data store, but it doesn't come with such settings by default, unlike most of RDBMSes.
- miohtama 5y agoNot all use cases require reliable data storage and it is ok lose few seconds of data. Think simple discussion forums, internal chat applications. There are some scenarios where ease of use and a single server scalability pays off in the faster development and devops cost.
- arpa 5y agoGP was asking why redis is not a reliable storage solution/database. Redis is great as an unreliable (not source-of-truth) storage.
- kwdc 5y agoFor that temporary use case, how does it compare to memcached?
- jasonwatkinspdx 5y agoMostly boils down to Redis having a richer API, and memcached being faster / more efficient. The new EXT store stuff allows you to leverage fast ssd's to cache stupid huge datasets. Memcached is also one of the most battle tested things out there in open source. I've used them both plenty over the years, but tend to lean towards memcached now unless I really need some Redis API feature.
- charrondev 5y agoI work on a SaaS community forums service and I can assure you data loss is not acceptable to our clients. As a result we use MySQL w/ memcached, although we are considering a swap to redis for the caching layer.
- deleted 5y ago[deleted]
- EvilEy3 5y ago> Not all use cases require reliable data storage and it is ok lose few seconds of data. Think simple discussion forums, internal chat applications. That is definitely not ok. I'd be really pissed as a user if I wrote a huge comment and it suddenly disappeared.
- miohtama 5y agoIt only disappears if there is a catastrophic failure. The likelihood for such thing to happen when you write a huge comment are less than jackpot in Las Vegas, a sensible risk tradeoff for better development experience and cost.
- TheCoelacanth 5y agoHow is that a sensible tradeoff compared to just using something that was actually designed to be a database when you need a database?
- miohtama 5y agoYou do not need a relational database for a simple chat/forum application.
- obstacle1 5y ago> a sensible risk tradeoff Note the tradeoff doesn't make sense as soon as you're operating at a meaningful scale. A small likelihood of failure at small scale translates to "I expect a failure a million years from now", whereas at large scale it's more like "a month from now". Accepting the same percent risk of data loss in the former case might be OK, but in the latter case is irresponsible. Provided whatever you're storing is not transient data.
- miohtama 5y agoYou are correct. I wrote the original comment as "single server" so I assume it does not mean a meaningful scale and can be more effectively dealt with a support ticket. Not everything needs to be growth trajectory SaaS.