Live data from Hacker News

Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance

redislabs.com

11–20 of 56 posts

Re: Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance

#15
post #12

Very impressive, especially how it doesn't seem to matter much on the read/write ratio. I've only used redis to cache, do folks really use it as a DB?

I'd also like to know what else is it used for.

High traffic atomic push/pop between multiple clients (often used for jobs like kue.js)

write coalescing - caching individual writes for later bulk inserts into a db to help insert rates.

Simple counts and counters which can be incremented and then purged/reset on interval.

Simple Pub/sub for medium throughout systems.

Many more applications than simple key/value.

Re: Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance

#16
post #14

I don't like to admit but I still don't get it, could I use Redis as a main webapp backend?

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.

Re: Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance

#17
post #14

I don't like to admit but I still don't get it, could I use Redis as a main webapp backend?

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

#18
post #14

I don't like to admit but I still don't get it, could I use Redis as a main webapp backend?

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

#19
Questions I would like to see answered:

- How does oss redis compare to enterprise redis ?

- What are the differences when running the same benchmarks with both oss redis and enterprise redis ?

- what is the marginal utility of an additional cpu core/thread ? that is, what happens if I run those benchmarks on an AMD ThreadRipper ?

Re: Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance

#20
post #17
post #14

I don't like to admit but I still don't get it, could I use Redis as a main webapp backend?

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

Using AOF you have better durability, you can read about it in the link you provided.
Post reply on HN