Re:Redis Turns 10 – How it started with a single post on Hac...
by Thaxll on Wednesday February 27, 2019 @05:54PM
(#19267658)
Redis is safe to use as a locking mechanism, many people do that. You should dig deeper than Asphyr said it doesn't work.
Re:Redis Turns 10 – How it started with a single post on Hac...
by atombender on Wednesday February 27, 2019 @06:36PM
(#19267898)
How do you do that in a distributed cluster with HA failover using Sentinel, considering that Sentinel is susceptible to partitions and drops?
I don't really understand the nature of the "tradeoffs" you mention. As Aphyr pointed out, Redis (with Sentinel) is not safe to use as a database, a queue or even as a lock service. That really narrows the possible use cases. I can absolutely see Redis being appropriate for many "lossy" applications: Caching, web sessions, rate-limiting counters, precomputed analytics data, intermediate outputs from distributed data processing pipelines, that kind of thing.
But the use cases where I'd reach for Redis seem a lot fewer than with data stores that have high consistency guarantees, such as FoundationDB, TiDB/TiKV, CockroachDB, or Cassandra/ScyllaDB. With the exception of TiDB, these are a bit easier to reason about since there's no Redis/Sentinel/Twemproxy split.
On the other hand, I certainly appreciate the specialized data structures and Lua support that Redis comes with.