Can Redis be used as a Primary database?

preview_player
Показать описание
This episode of the backend engineering show is sponsored by my friends at RedisLabs. I’m going to break this video into three sections, we will first define features that qualify a primary database? Then we will see if Redis actually check the boxes of a primary database and finally we explore the features of Redis that take it beyond a primary database. I was personally surprised by most of those.

Addendum: Redis also provides strict serializability through RedisRaft project. RedisRaft has passed the Jepsen tests, an industry standard for verifying consistency of distributed database systems.

Read more on RedisRaft here

Redis Raft github

Strict Serializability

Chapters
0:00 Intro
1:00 What Qualifies a primary database
3:00 Does Redis Check the boxes?
7:40 beyond Redis

Resources
Рекомендации по теме
Комментарии
Автор

Note regarding consistency @5:20: Redis also provides strict serializability(Strong consistency) through the RedisRaft project. RedisRaft has passed the Jepsen tests, an industry standard for verifying the consistency of distributed database systems.

hnasr
Автор

Cool stuff, Hussein.

But, every time you talk about some technology, you always say that everyting has its costs. Every technology has pros and cons.
But that time you only talked about pros.
I think this video is more like advertisement rather than regular discussion.
But anyway, thank you for amazing videos.
It would be great if you make another video about drawbacks of using Redis as a primary database.

Music_song_Musurmonov_Mehroj
Автор

Very nice collation and explaination of insights on Redis, thanks Hussein!

nesaluj
Автор

"Is Redis amazing?" proudly sponsored by Redis.

Disclaimer: I use redis everyday and love it.

randomexcuse
Автор

There is so much content for software engineering on you tube, but yours is on a very different level, it may sometimes have less likes but the knowledge level and quality is higher than any other content available online.

shaswatkumar
Автор

Amazing amazing videos ....your content is very crisp and clear 👍👍 ... please keep on updating new videos ...

aneksingh
Автор

Good video Hussein but, you still need to be balanced and explaining the pros and cons. Benefit and price.

cepuofficial
Автор

I believe you can use Redis as a primary database BUT the circumstances depends on what you need. AOF and snapshot can persist data yea but you’re limited to the ram you have available (which can be expensive). Not only that but less frequently visited data should be in your hd/disk instead of memory since that’s a waste of precious ram being used up. It’s a lot cheaper storing it in hd/disk.

Would be cool if Redis could store less frequently visited data to the hd/disk in exchange for some loss in speed and once it starts getting many accesses move the data from hd/disk to RAM when needed. Not sure if the loss in speed would be significant implementing this though.

Squawkize
Автор

Just what I needed... I was literally just searching for this...

yegeunator
Автор

Hussein, I'd be interested in hearing your thoughts on FaunDB and thank you for covering Redis as a primary database too

dawsdep
Автор

How would you do joins, aggregations, and query optimisation?

Pifagorass
Автор

When discussing choosing a database, you often dont consider the query language capabilities . Different databases has different query languages to suit different needs.

How come you ignore it so often?

mtnrabi
Автор

I almost mistaken this fireship video lol, but thanks Hussein!

awikwok
Автор

I used redis as cache, good to know it can be used as dB also. However, is there any configuration to use it as hot, cold or glacier type?

pdpro
Автор

Not recommended, if there is a lot of data, you end up paying lot of money for redis compared to other DB's

prakashreddy
Автор

Hussein, can you schedule a video about limitations and performance benchmarking concerning (in-memory db vs buffer pool) since in both paradigm the memory is involved..

kapssul
Автор

Nice video. We recenly did have to use redis for some use cases as the primary source of data. It can work for simpler use cases but falls apart when it comes to slicing and dicing the data. Imagine replacing the "students" table in postgres with data in redis. Say each record contains students name, age, and city. You want to be able to fetch all students whose name starts with "xyz" AND are b/w 12-14 years of age AND live in Vancouver. You will basically end up using 4 different data structures and and a lot of overhead. Store age as a sorted set where weight is the age and the value could be the all student ids. Then store city in another Hash where key is the city and values could be ids. and so on. And then try to fetch all ids and do an intersection in memory and then look up the object with that id. Managing and extending such a system will be a nightmare. :D

amitkumargoldy
Автор

Maybe three things to think about are 1) what's the literal cost of I/O in memory vs persisted storage on disk needed 2) what's the average and foreseeable max space needed and 3) what's the probability of memory going down or being corrupted vs disk, and what are you willing to tolerate before resorting to backups (or a secondary db)

__redacted__
Автор

This video felt more like an ad than a discussion like your usual videos.

MrYokyScape
Автор

I work with in memory data models built in MSSQL and I have an amazing T-SQL experience thus far & only having tiny hiccups around querying data from external databases and combining datasets with the in memory tables. Can anyone recommend a good t-sql client for Redis?

martiruda