Forum Moderators: open

Message Too Old, No Replies

Does anyone have experience with Redis as a database?

         

DevelopIqwe

9:02 am on Oct 9, 2020 (gmt 0)



Hello!

A few buddies and I are working on a messaging service that will be implemented in a new app. But I don't want to give away too much (yet). Logically, we need lists of data that have to be updated and loaded at any time and in real time.

I have read a lot about Redis. This is an in-memory database with a key-value data structure. Redis is a non-relational database (NoSQL) and would apparently be good, because there is no complicated data structure and the access speeds are supposed to be quite fast. I would manage and monitor it through the open source provider Aiven. But with Redis the data is not on a hard disk but in memory. So Redis works not only as memory but also as cache. This means that you have to have a lot of memory available and therefore the costs would be higher, right? Is it still worth it? What do you think? Do you have other solutions to recommend?

Thanks in advance

graeme_p

9:28 am on Oct 9, 2020 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You need to size you requirements.

Unless you need to scale to be huge or your messages are very large, memory is cheap.

You have persistence options, so the data can be on hard disk as well.

Its fairly simple to use and I like it. I have used it as both cache and queue. Depending on what you are trying to do, RabbitMQ might be worth looking at.

NickMNS

12:52 pm on Oct 9, 2020 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I use Redis on an ongoing basis. I find it simple and easy to use with many useful features. I am often amazed and that things allows you to do. That said I do not use it for persistent storage. When it comes to creating an app like a messaging app you will likely still need a full featured database, to store user credentials, and user data. I like to use MongoDB which is also NoSQL but you can use whatever you like.

One note about NoSQL, it is not a specific thing, not an alternative to SQL, it means that the system doesn't use SQL. So systems like Redis and MongoDB both NoSQL, are not the same. The way data is stored and accessed is different in each, thus you will need to learn how both these systems work (it is straight forward in both cases). The big advantage of noSQL, is that it provides a high degree of flexibility, allowing you to structure your data and data access in ways that are optimal for you specific application.