I thought I knew Redis, but I was wrong. Setup a database, then download Redis Insight and you'll see why bit.ly/3wnVsXA. Stay tuned for a full tutorial where we really put it to the test.
I always used redis as volatile key value storage, either cache or transitional data .. but I didn't knew you can actually use it as primary database... I will dig more into it. Thanks.
This is a channel I didn't know I needed. I am studying up on different cloud services and it's like drinking from a fire hydrant. When I have to get familiar with dozens of services, it's great to have the ability to get a brief overview just like it is done in this video. Thank you!
Fantastic as usual (you really make our content look bad next to yours Jeff haha) What I would add is redis achieves full durability through APF (append only file) journaling aka WAL or redo logs in other databases. The beauty here is you can configure how durable you want Redis to be which can give you more write performance. Full durability means every write synchronously writes to the AOF disk and only succeeds when that write to disk succeeds. Your writes are as fast as your AOF disk but you suffer no data loss in case of an outage. You can configure redis journaling to be asynchronously written every x second (minimum 1 second) which means writes are blazing fast (in memory). Every second the writes are buffered and asynchronously written to the AOF. However you could lose a second worth of data in case of an outage. So I am really interested to see how redis perform in full durability mode against other DBMS specially with indexes and concurrent transactions.
@@Fireship depends on the system don't you think, for a financial system or a system which heavily depends on data integrity, fast doesn't mean better, correct does.
“if you need relations then add graphs extension” I would love to see a video where you explain if it possible to swap a relation database with a graph database
I have to admit - whenever I'm trying to understand some fancy tech concept, like get a detailed overview of it, Fireship is the one-stop solution !! Amazing content 👏🏻👏🏻👏🏻
Your shorts are usually jokey but these videos really do a good job of explaining the main functionality of certain frameworks and concepts. Whether or not I'd use redis comes down to what project is being worked on. All projects I've worked on so far have never needed something more advanced than a regular mysql database. The thing is that people want more performance out of it yet I haven't come even close to the full potential by optimizing my queries properly and beyond that level of performance we're talking about completely different levels of scale
These videos are highly accessible and that’s why they blow up. Fireship should get a dedicated team with the express purpose of planning out these bite-sized videos… seriously. Have different “tiers” as well, like normie, beginner, and tech wizard videos.
Been using Redis for many years, and NEVER did I think to use it for more than just a basic message bus or cache store... Thank you for opening my eyes!
I use Redis as my primary to reduce complexity but I think it's a preference thing. I don't like queries and procedures so it's better for my sanity just to fetch and parse the data.
Not just preference. Apples, oranges. Google for ACID vs BASE. (right tool) => right job. Also HA/FT is not " "guaranteed" by Redis snapshots || "transaction logs" (or even combined) in Redis as opposed to oldskool SQL-like BASE platforms. It is with transaction logs, but takes a hell lot of time to recover. Devil is in the details. (the 101th second and onwards...) Check out AWS ElastiCache reference. (yes it's managed, but still) It does however cope with HA/FT via replication in an excellent way! Redis is wonderful for a given set of challenges, "traditional" SQL (or SQL-like) engines are perfect for other types of problems etc.
I am contemplating using redis as a primary store but is discouraged by the small amount of people using redis as a primary store. What are the caveats or gotchas involved in this?
@@MrSMGun it's basically a key-value storage. You can store binary data, strings, lists and sets. It's flat so you have to emulate depth with fake paths in key strings or double keying by making one value a list of id's of other values that are part of a single group.
For me personally, the possibility to use Redis as a very easy message broker is more interesting. But as always, your 100 seconds of... videos are awesome!
I have learnt a lot of new things that I have never worked with from your videos, like AWS, nginx, kubernetes, graphQL(and other dbs), typescript to name a few. One thing that I don't understand is how they work together. I would really love to see a video where you design a mock system using all of these (and possibly more) and explain each of their roles and why you chose it (kinda like your reverse-cloud migration video using raspberry pi). Whenever I think of a software architecture I think of them as several layers that interact with each other. However, I am unable to assign which layer what belongs to by watching a stand alone tutorial about a single tool. Btw, I am a college senior pursuing CS major and I love your content. Thanks for all the awesome contents.
I love your 100 seconds videos! I watch and like them all, hoping to help you beat the UA-cam recommendation algorithm and make these wonderful short videos show up as suggested videos for other folks. Now have a great day, and keep up the good work!
I was lucky enough to have used Redis in my previous job (a bit more than two years) and its awesome. The only problem I see with using Redis is the use of third-party libraries to connect with it.
@@JariNestel true but like one of the answers says you can snapshot the data and save its indexes in redis. However that will make it behave like a normal relational database but will solve the problem. Yeah otherwise you're right TBs of ram is unrealistic and undesirable.
@@JariNestel Additionally, if you run out of RAM, Redis just starts ejecting data with no regard to its meaning or context. Seems like a pretty terrible primary database, TBH.
I implemented using Redis on our backend on a pretty basic level and I will say that it was pretty easy it’s a little tricky sometimes if you wanna filter through data to the user but you can’t argue with how fast it is
Awesome!!!!!! The best short explanation about Redis. Good to know about Redis as the primary database is an option on the table (is not a SQL joke but it could be hahaha). Depending on the use case can and cost relation it can be really great. The Radisson and RedisGraph look very interesting to me.
I lurve me some Redis. It's been my favorite DB since 2011. However, using it as your primary database is only a good idea when you can afford to lose the last few seconds of data in the event of a container or service failure since write ACKs do not wait for a memory to disk write to complete.
I would (and have) use redis as primary database for the application or microservice but would still have a persisting database in the background that could reinstantiate the state to redis if need be.
I would use Redis in “client side apps” as support until the final commit. For example, eletronic health records are extremelly complex and a patient’s single day events involve hundreds or thousands of structured and unstructured data. Having a malleable and simpler “first” line in memory/client hd dbms can help to deal with the persistence design at server side, to reduce data volume exchanges during the process. Won’t use it for big data analytics or to deal with higher data security needs.
haha this video will have caused a lot of people a lot of headache in a few years. No single tool can make your app magically faster. It's about system design and using the right tools in the right places. Stay safe out there
I thought I knew redis. But I only knew about the key-value store. Never seen the JSON or Search functionality. Definitely gonna try that after seeing this video. Thanks a lot, and I'd love to see more about redis
Depends on what you want to do. But you can write to your cache and database and then check your cache to read values and fallback to your database if it doesn't exist in the cache. You can also batch queries to your database.
I use redis as a cache for stuff I don't want to persist but want my code to have fast access to. I use it as a queue and cache for sharing data between our nodes responsible for processing it. I also use it to cache results of expensive but fairly frequent queries.
I use "Redis" while talking to FE team and other developers, to "Show off", as I won't tell my friends that I own top varient of Iphone but surely tell them that what 'sekcy' tech I use, thanks for making these videos as summarized...
You didnt even touch on redis pub/sub which is by far the best feature. Redis saved my project at least 3 times over, when i comes to scaling. Every dev should know how to use this. I cant recommend it enough
If you use Redis as your primary database you probably want it to be durable. By default Redis only fsyncs every second. In conclusion this means you have to configure Redis to fsync to disk synchronously with each request, which will hurt performance significantly or have to tell your application developers that one second of acknowledged writes could be lost.. Redis is also primarily single threaded (I know that Redis forks for snapshots and log rewrites etc. and that there is multi threading since Redis 6 "I/O threading" but this implementation is so bad lets pretend it doesn’t exist…) So if you really want to scale Redis you have to go for a Redis Cluster.
I see that it's possible to use redis as a primary database, but migrating a legacy system built on a traditional relational database to redis is an absolute no-go.
As primary DB no,especially if there is need for strong persistence guarantees ( between ram & disk ), also not sure how easily is it to scale and synchronise across multiple machines / disks . Enterprise DBs eg oracle) sells both very highly priced. For small personal projects everything works, but production systems are not easy to experiment with in small teams .Amazing video though.
I've used redis in production before, the first problem is always "do you need it" it not just fast database as I thought, turned out we didn't need redis.
Hey Fireship. I use Redis and love this approach. I love all your content and never miss a video💙. I have a request, could you do one for Rethink DB and probably one about deploying a running container instance. Appreciate it. Thanks for all the content, I have grown as a developer watching your channel ❤️. Cheers.
I really appreciate the video. But it would be more useful if you could add in description cons of using it as well. This would really enhance the quality. I mean it would be a good source material rather than people individually going out and searching
I thought I knew Redis, but I was wrong. Setup a database, then download Redis Insight and you'll see why bit.ly/3wnVsXA. Stay tuned for a full tutorial where we really put it to the test.
let's go i'll finally have a reason to learn redis if you explain it :D
I get what you are saying. It is just a lot of work upfront to set an excellent caching system.
I thought I knew Redis, but I was wrong too! I never knew it was acronym for Remote Dictionary Server 🔥
I always used redis as volatile key value storage, either cache or transitional data .. but I didn't knew you can actually use it as primary database... I will dig more into it. Thanks.
you learn wayy faster
This is a channel I didn't know I needed. I am studying up on different cloud services and it's like drinking from a fire hydrant. When I have to get familiar with dozens of services, it's great to have the ability to get a brief overview just like it is done in this video. Thank you!
Fantastic as usual (you really make our content look bad next to yours Jeff haha)
What I would add is redis achieves full durability through APF (append only file) journaling aka WAL or redo logs in other databases.
The beauty here is you can configure how durable you want Redis to be which can give you more write performance. Full durability means every write synchronously writes to the AOF disk and only succeeds when that write to disk succeeds. Your writes are as fast as your AOF disk but you suffer no data loss in case of an outage.
You can configure redis journaling to be asynchronously written every x second (minimum 1 second) which means writes are blazing fast (in memory). Every second the writes are buffered and asynchronously written to the AOF. However you could lose a second worth of data in case of an outage.
So I am really interested to see how redis perform in full durability mode against other DBMS specially with indexes and concurrent transactions.
Love your content as well, bro ♥️
Love your content... Because of you I have learned a lot... Thanks for sharing your valuable time and knowledge man
Interesting, I'll roll the dice and take performance over reliability.
@@Fireship depends on the system don't you think, for a financial system or a system which heavily depends on data integrity, fast doesn't mean better, correct does.
Jeff always using background music, maybe you should consider about that in your future video
100 seconds! That's all the attention span I have
nice
i forgot what i was going to say
Kinda sad
@@thedragonrises6882 what do you mean kinda
@@gubocci I mean it could've been 30secs like most of the morons on social media nowadays but atleast OP is on 100secs for now.
I got less. Got lost in the middle of the video.
You just totally changed my understanding of Redis at 1 AM. Excellent video.
As a computer science student, I start from your channel whenever I have to study a different topic. Thanks for the excellent short content.🙏
Incredible. This is by far the most clear and concise explanation of Redis I've ever heard
Redis in 100 Seconds
Me: "pfff... I already know reddis. I bet there is nothing I'll learn"
@0:19:
Me: "I've already failed"
same, mindblown!
Seems you didn't even know how to spell it. :D
Your ability to produce quality content so fast is amazing
That animated intro 😍
“if you need relations then add graphs extension” I would love to see a video where you explain if it possible to swap a relation database with a graph database
Want to see this too. Because now, it seems like to use a cow instead of a horse in a wagon. You maybe can, but why?
Neo4j
@@assorium exactly, that's a very good analogy.
Graph databases are awesome I’m working with one right now for a project. And seeing that redis now includes one as an option I’m sold!!
and since neo4j just launched a graphdb.....
The animation at 2:16 was kinda cool
@Ishtiaque A Walid that was too easy to type so I figured..
Probably made in Adobe After Effects
@@_timestamp I was hoping it was a css keyframes anim
I have to admit - whenever I'm trying to understand some fancy tech concept, like get a detailed overview of it, Fireship is the one-stop solution !! Amazing content 👏🏻👏🏻👏🏻
Your shorts are usually jokey but these videos really do a good job of explaining the main functionality of certain frameworks and concepts. Whether or not I'd use redis comes down to what project is being worked on. All projects I've worked on so far have never needed something more advanced than a regular mysql database. The thing is that people want more performance out of it yet I haven't come even close to the full potential by optimizing my queries properly and beyond that level of performance we're talking about completely different levels of scale
I can't say no to a tech video that teaches me something valuable in only 100 seconds.
Salvatore Sanfilippo is one of the many reasons why I'm proud of being Italian (he comes just after the pizza)
And football?
hope you guys win on sunday.
You won!!!!
These videos are highly accessible and that’s why they blow up. Fireship should get a dedicated team with the express purpose of planning out these bite-sized videos… seriously.
Have different “tiers” as well, like normie, beginner, and tech wizard videos.
Honestly you have such a gift, I don’t even think redis themselves could come up with a better commercial
Been using Redis for many years, and NEVER did I think to use it for more than just a basic message bus or cache store... Thank you for opening my eyes!
I use Redis as my primary to reduce complexity but I think it's a preference thing. I don't like queries and procedures so it's better for my sanity just to fetch and parse the data.
Not just preference. Apples, oranges. Google for ACID vs BASE. (right tool) => right job. Also HA/FT is not "
"guaranteed" by Redis snapshots || "transaction logs" (or even combined) in Redis as opposed to oldskool SQL-like BASE platforms. It is with transaction logs, but takes a hell lot of time to recover. Devil is in the details. (the 101th second and onwards...)
Check out AWS ElastiCache reference. (yes it's managed, but still) It does however cope with HA/FT via replication in an excellent way! Redis is wonderful for a given set of challenges, "traditional" SQL (or SQL-like) engines are perfect for other types of problems etc.
I am contemplating using redis as a primary store but is discouraged by the small amount of people using redis as a primary store. What are the caveats or gotchas involved in this?
@@MrSMGun it's basically a key-value storage. You can store binary data, strings, lists and sets. It's flat so you have to emulate depth with fake paths in key strings or double keying by making one value a list of id's of other values that are part of a single group.
It is closed source for future updates now
It's not open source but instead "source-available"
For me personally, the possibility to use Redis as a very easy message broker is more interesting. But as always, your 100 seconds of... videos are awesome!
I have learnt a lot of new things that I have never worked with from your videos, like AWS, nginx, kubernetes, graphQL(and other dbs), typescript to name a few. One thing that I don't understand is how they work together. I would really love to see a video where you design a mock system using all of these (and possibly more) and explain each of their roles and why you chose it (kinda like your reverse-cloud migration video using raspberry pi).
Whenever I think of a software architecture I think of them as several layers that interact with each other. However, I am unable to assign which layer what belongs to by watching a stand alone tutorial about a single tool.
Btw, I am a college senior pursuing CS major and I love your content. Thanks for all the awesome contents.
look up "system design"
I love your 100 seconds videos!
I watch and like them all, hoping to help you beat the UA-cam recommendation algorithm and make these wonderful short videos show up as suggested videos for other folks.
Now have a great day, and keep up the good work!
Thanks for making it in dark background.
I love your 100 seconds stuff!!! 🔥
I was just studying this! I also read that redis can serve as a pub/sub mechanism replacing your usual queue tech (for example SQS)
I was lucky enough to have used Redis in my previous job (a bit more than two years) and its awesome. The only problem I see with using Redis is the use of third-party libraries to connect with it.
I like your 100 second video Jeff. I always make sure that I watch your video each day.
The idea of Redis as primary database terrifies me 😬
Always fast database sounds too good to be true tho
Me too, especially as I don't see it scaling into the TB region at all, though as temporary storage it proofed itself to be the better solution.
@@JariNestel You don't see it scaling into TB/PB region because you have this "feeling" or you some proof/ actual implementation issues?
@@JariNestel true but like one of the answers says you can snapshot the data and save its indexes in redis. However that will make it behave like a normal relational database but will solve the problem. Yeah otherwise you're right TBs of ram is unrealistic and undesirable.
@@JariNestel Additionally, if you run out of RAM, Redis just starts ejecting data with no regard to its meaning or context. Seems like a pretty terrible primary database, TBH.
@@ShaneTheKing you have full control over what eviction policy is used, which can be disabled all together if you want.
I implemented using Redis on our backend on a pretty basic level and I will say that it was pretty easy it’s a little tricky sometimes if you wanna filter through data to the user but you can’t argue with how fast it is
Now repeat this 100 seconds video 10 more times. I love this channel. Thanks Jeff
100 seconds of Cassandra / Scylla. Keep up the good work!
I am using it as a cache memory for news sites; the primary database is PostgreSQL
What is your backend Framework
nice straight forward 'no nonsense' video. Thanks a lot for these!
I have only used redis to store session and such but this makes me wanna expand upon it. Thank you!!
Awesome!!!!!!
The best short explanation about Redis. Good to know about Redis as the primary database is an option on the table (is not a SQL joke but it could be hahaha).
Depending on the use case can and cost relation it can be really great.
The Radisson and RedisGraph look very interesting to me.
managing Redis at scale is a challenge.. since you mentioned Redislabs, running the database on Redislabs also removes scale headaches!
I have setup Redis as cluster with 6 nodes. ✌
@Chris Habgood spoilers, it is, but once you set it up correctly you’re good to go
@Chris Habgood no as of now no such issue. Just we need to follow proper configuration
Why you need many nodes? I thought it was scalable to couple of GBs easily? I don't think you're having >300GB dataset?
@@dr.z7958 why wouldn’t he?
@@dr.z7958 master slave architecture for failover. 3 master nodes and 3 slave nodes.
I lurve me some Redis. It's been my favorite DB since 2011. However, using it as your primary database is only a good idea when you can afford to lose the last few seconds of data in the event of a container or service failure since write ACKs do not wait for a memory to disk write to complete.
Google Sheet with Sheet API & Google script is the only database I'm ever going to use...
this is the best first approach someone can get to more in depth knowledge
Other channel :- "speed up the video"
Fireship:- "Decrease the speed" 😂
I was waiting for this video for long! Thank you Jeff!
I would (and have) use redis as primary database for the application or microservice but would still have a persisting database in the background that could reinstantiate the state to redis if need be.
I would use Redis in “client side apps” as support until the final commit. For example, eletronic health records are extremelly complex and a patient’s single day events involve hundreds or thousands of structured and unstructured data. Having a malleable and simpler “first” line in memory/client hd dbms can help to deal with the persistence design at server side, to reduce data volume exchanges during the process. Won’t use it for big data analytics or to deal with higher data security needs.
have been using redis for Queue tasks without knowing all of this ! thanks for letting me know this
Redis is still somehow one of the most underrated tools on the web
Haven't worked with Reddis for a long time. "Reddis as the main db" is an interesting concept..
Thanks
Best fucking explanation I've seen on Redis for a very long time
These short videos are very addictive.
We are using Redis primarily for storing data that are often required from backend. Can Redis also be used as a message broker?
Indeed, message broker and kafka-like streams are common use cases.
What is your backend Framework
If you want something similar to SQS but where you can also delete any message by id, RSMQ is a pretty decent nodejs library to make your life easier
Nice explanation in short time, thanks!
Wow never thought of using redis as primary database. Thanks a lot
My Access Database for my website of 5,000,000 users is just fine thank you.
Now, off to figure out why people are complaining about it being slow. 😁
You've mastered the youtube viewer attention span. "Redis in 5 minutes" would get very little interest. But a minute and a half? Yeah I can spare that
in the last 5 years redis has grown pretty neat. did relational redis on application level with lua scripting on redis in 2015 using a php app :)
haha this video will have caused a lot of people a lot of headache in a few years. No single tool can make your app magically faster. It's about system design and using the right tools in the right places. Stay safe out there
This definitely blew my mind. Awesome vid.
I thought I knew redis. But I only knew about the key-value store. Never seen the JSON or Search functionality. Definitely gonna try that after seeing this video. Thanks a lot, and I'd love to see more about redis
How do you use both a relational database (postgreSQL for example) and redis in the same website?
Depends on what you want to do. But you can write to your cache and database and then check your cache to read values and fallback to your database if it doesn't exist in the cache. You can also batch queries to your database.
I use redis as a cache for stuff I don't want to persist but want my code to have fast access to.
I use it as a queue and cache for sharing data between our nodes responsible for processing it.
I also use it to cache results of expensive but fairly frequent queries.
I use "Redis" while talking to FE team and other developers, to "Show off", as I won't tell my friends that I own top varient of Iphone but surely tell them that what 'sekcy' tech I use,
thanks for making these videos as summarized...
I'd like to see a video on etcd. Not only is it a powerful key-value store, but understanding how it uses the raft algorithm in a cluster is amazing.
You didnt even touch on redis pub/sub which is by far the best feature.
Redis saved my project at least 3 times over, when i comes to scaling. Every dev should know how to use this. I cant recommend it enough
Ultimate explanation in shot period
Its excellent for syncing the data from your relational database and serving your get requests through it
Cool! Short and sweet! Perfect for quick understanding
If you use Redis as your primary database you probably want it to be durable. By default Redis only fsyncs every second. In conclusion this means you have to configure Redis to fsync to disk synchronously with each request, which will hurt performance significantly or have to tell your application developers that one second of acknowledged writes could be lost.. Redis is also primarily single threaded (I know that Redis forks for snapshots and log rewrites etc. and that there is multi threading since Redis 6 "I/O threading" but this implementation is so bad lets pretend it doesn’t exist…) So if you really want to scale Redis you have to go for a Redis Cluster.
Always a great 100-sec explanation.
TNX for your usefull and really fast! descriptive video
Loved the video, quick and to the point -- just as I like it :3
Broo I just learn Redis today from bootcamp, then your video just came up 😳😳
Fantastic, gonna use it on my next project
These kind of videos are what I need when I have to install software as prerequisites for a project and I want to know what they are.
This has made me pretty excited about a DB. It seems super scary keeping it in memory though!
I am a beginner in the backend programming field and am about to choose a database system for my portfolio. Redis and MySQL seem quite good.
I see that it's possible to use redis as a primary database, but migrating a legacy system built on a traditional relational database to redis is an absolute no-go.
Redis rocks and provides superb performance
Just when I needed it. Thanks fireship. 👍
The other thing are queries, maybe executing searches in redis is harder than in a traditional database engine. Specially when the data set is larger.
this aged well
Agreed
what happened?
@@kairavb License shenanigans
High quality content as always, thanks alot
This is the channel every single software engineer need, I thought I knew Redis... now I know that I know nothing
NATS in 100 sec please. Awesome series :)
As primary DB no,especially if there is need for strong persistence guarantees ( between ram & disk ), also not sure how easily is it to scale and synchronise across multiple machines / disks . Enterprise DBs eg oracle) sells both very highly priced. For small personal projects everything works, but production systems are not easy to experiment with in small teams .Amazing video though.
I've used redis in production before, the first problem is always "do you need it" it not just fast database as I thought, turned out we didn't need redis.
Oh damn I was using Redis the traditional way for a long time I didn't know how much it evolved!
Has someone else started skipping the video backward at the start? sounds pretty good. Great video btw
The best ad I have ever seen.
Hey Fireship. I use Redis and love this approach. I love all your content and never miss a video💙. I have a request, could you do one for Rethink DB and probably one about deploying a running container instance. Appreciate it. Thanks for all the content, I have grown as a developer watching your channel ❤️.
Cheers.
I really appreciate the video. But it would be more useful if you could add in description cons of using it as well. This would really enhance the quality. I mean it would be a good source material rather than people individually going out and searching
Yes Jeff, I need a full tutorial. Great video btw! and yes, pls, tutorial.
Redis is most amazing technology in the world, I really like it
Though you have explained so much but its only brought down to storing key:value pair!
I did use redis for storing sessions and it is really so fast. May be there are more scalable or faster ways of doing it too
Dude I love your art! Big fan
Boom so redis can help you get and set data as fast as possible
I'm going to see about trialling this on a project. Awesome
I love this short videos
Good video. Please make one on JSDocs too.