News for hackers. Stuff that matters.
Re:Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance by patkai on Sunday July 23, 2017 @04:43PM (#14834276)
I don't like to admit but I still don't get it, could I use Redis as a main webapp backend?
Re:Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance by immad on Sunday July 23, 2017 @04:51PM (#14834315)
Redis won't function till it has loaded all data from disk to memory. So if your webapp doesn't have too much data then possibly.

Also since Redis is memory backed you need more RAM then data. This can get very costly.

Another annoyance is that Redis is single process single threaded so you really have to avoid running long running queries unless you do extensive manual sharding.

(Disclaimer: it's been a few years since I had to think about these constraints so maybe some are removed in more recent versions of Redis)

Re:Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance by yaaminu on Sunday July 23, 2017 @05:47PM (#14834588)
Redis can now be multi threaded in custom modules
Re:Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance by dvirsky on Sunday July 23, 2017 @05:52PM (#14834608)
Sort of - the model it supports is not really multi-threaded. The modules can spawn threads, and acquire a "GIL" when they want to touch actual Redis data - thus only one thread at a time actually "owns" the entire Redis instance.

This allows long running queries to do primitive cooperative multi-tasking, releasing the GIL and letting other queries have a chance; But there is no real parallel data access. You will only gain real parallelism if you have actual work to do that does not touch the data directly when a thread is not touching the GIL. There aren't many cases that this applies to - usually copying the data aside to do work on it is not worth the gain of parallelism.

Re:Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance by Yiftach on Monday July 24, 2017 @01:05AM (#14836005)
[disclosure I'm from Redis Labs] - around 50% of our 7K+ paying customers use Redis as a database. In general, you can setup an environment in which Redis is HA (replication + auto-failover) and persistent. Redis Enterprise does it by default + backup and DR + some enhancements to the Redis storage layer (as mentioned in this blog. These enhancements together with the high end storage device by Dell-EMC allowed us to reach this throughout & latency. BTW, this test ran on a single node, you can scale it by just adding node(s) to the cluster.
Re:Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance by mayank on Sunday July 23, 2017 @04:51PM (#14834314)
You definitely could, with some pretty big caveats:

* you can tolerate some data loss in case of system crashes/power failures/etc, because redis only flushes data to disk periodically [1]

* your dataset can fit in RAM, since redis is an in-memory datastore

[1] https://redis.io/topics/persistence

Re:Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance by kristoff_it on Sunday July 23, 2017 @05:12PM (#14834422)
Using AOF you have better durability, you can read about it in the link you provided.
Re:Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance by mayank on Sunday July 23, 2017 @07:15PM (#14834878)
As far as I know, AOF is still not the default setting. It's important to point this out, or otherwise Redis will suffer the same fate as early MongoDB, which had a similar default persistence model which many users didn't fully understand.
Re:Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance by dvirsky on Sunday July 23, 2017 @05:46PM (#14834582)
As long as your data will fit in RAM in a cost-effective way, and you can scale your cluster when it exhausts its memory. AFAIK Netflix are using it as a "real database", but of course not for everything - https://medium.com/netflix-techblog/introducing-dynomite-mak...
Re:Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance by znpy on Sunday July 23, 2017 @04:51PM (#14834312)
Long story short, "ACID" is what a datastore has to provide in order to be eligible to be called a "proper database".

So yeah, I guess you could use redis as main datastore.