Using Redis as the main/primary datastore?

5 points by deepGem ↗ HN
I have been following Redis since the 2.1 days on and off. As opposed to viewing Redis as a cache, especially with the 5.+ releases, I am strongly considering Redis as my main datastore, regardless of the use case, except some core corporate use cases such as banking, healthcare, ads etc where trillions of dollars are at stake. This is for several reasons:

1. Redis eliminates the cognitive overhead of learning another database language or data structures. What you know in your programming language can be more or less replicated in Redis. For anyone who does not come from a database/SQL background this is huge. Also you don't have to learn a new system or paradigm.

2. Speed - Hands down, Redis is the fastest datastore out there, at least going by practical experience. Forget about benchmarks and all that.

3. Resilience - Redis got a lot of flak for the AOF bugs that are mostly sorted out now. You have Sentinel, replication and what not. At least DR is not a concern anymore.

4. Plethora of clients - this was never a concern but, the client support has vastly improved in the past couple of years. We even have Async clients now.

I am glossing over the details, and am happy to jump in if required. Given all this, is anyone using or even considering Redis as their primary datastore or is Redis still seen as a cache for most use cases?

It'll be cool if we can have a constructive debate around this topic.

2 comments

[ 3.3 ms ] story [ 18.6 ms ] thread
Hey, we at Volument (volument.com) are using Redis as the primary datastore. We are extremely happy we chose that option. It gives us everything we need: extreme performance, scalability with customized sharding, stability with sentinels, and most importantly: a fantastic data model that is enjoyable to work with. We don't need to add anything extra to our stack if we later need a pub/sub system or realtime support for our custom chat app for example.

We use a custom Go-based system to collect the crazy amount of analytics that easily exceeds our memory, but for the core business logic, Redis is a top-notch choice. We actually build our whole CRM on top of Redis: https://volument.com/blog/the-power-of-simple-crud

A few years ago YouPorn publicly announced using Redis foto run most of the website, as a primary database, not just as a cache.

Before joining Redis Labs (1yr ago more or less), I wrote my own Redis module while consulting for a fintech startup to use Redis as a filter for credit card transactions. I liked how the solution turned out and it somewhat alleviated the pain of having to work with the iso8583 protocol.

Today I know a few of our customers using Redis as a primary database and the company is investing in that direction.

I'm a Developer Advocate so one of the main pain points that I see is the lack of tooling for primary database use cases, but I think the situation is improving. The problem wrt tools is that you can't just copy paste what works for other ecosystems to Redis. You have to rethink many things from the ground up.

As a (positive) example, take a look at this Python O"R"M for Redis: https://github.com/limpyd/redis-limpyd