Redis in 100 Seconds
HTML-код
- Опубликовано: 21 авг 2024
- Use the special link redis.info/fir... (or code: MATRIX200) to try Redis Enterprise Cloud to get a $200 credit, become part of a weekly raffle, and a chance to win a Tesla Model 3(Terms and conditions apply)!
Redis is an extremely fast in-memory database often used as a cache. It has evolved into a multi-model database with support for graphs, JSON documents, full-text search, and more. Try Redis Enterprise for free bit.ly/3wnVsXA
#database #tech #100SecondsOfCode
Note. I collaborated with RedisLabs on this video, but I maintained full creative control over the content - Redis it’s a product I genuinely like and use (like all topics on my channel).
🔗 Resources
Redis Modules: bit.ly/3ABCEHu
Redis on Github: github.com/red...
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
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.
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!
“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.....
That animated intro 😍
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
You just totally changed my understanding of Redis at 1 AM. Excellent video.
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
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!!!!
As a computer science student, I start from your channel whenever I have to study a different topic. Thanks for the excellent short content.🙏
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.
Your ability to produce quality content so fast is amazing
Incredible. This is by far the most clear and concise explanation of Redis I've ever heard
I can't say no to a tech video that teaches me something valuable in only 100 seconds.
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 👏🏻👏🏻👏🏻
It is closed source for future updates now
It's not open source but instead "source-available"
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"
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
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 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.
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!
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!
Other channel :- "speed up the video"
Fireship:- "Decrease the speed" 😂
Thanks for making it in dark background.
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.
Fireship told me more than masses of big books 10 years ago. It's crazy how much useful information you can share within a handful of seconds, when done right
I am using it as a cache memory for news sites; the primary database is PostgreSQL
What is your backend Framework
this aged well
Agreed
what happened?
@@kairavb License shenanigans
100 seconds of Cassandra / Scylla. 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.
Redis is still somehow one of the most underrated tools on the web
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)
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 love your 100 seconds stuff!!! 🔥
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
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 love your 100 seconds videos!
I watch and like them all, hoping to help you beat the RUclips 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 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 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
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.
managing Redis at scale is a challenge.. since you mentioned Redislabs, running the database on Redislabs also removes scale headaches!
this is the best first approach someone can get to more in depth knowledge
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
Best fucking explanation I've seen on Redis for a very long time
These short videos are very addictive.
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.
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. 😁
Got an email from Redis Lab today featuring this video!
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.
Too be honest before this video I thought of redis as a fast simple key-value cache... might have to rethink
Same, didn't realize they had extensions like RedisGraph.
Well technically you're not wrong, but you can do anything with a bit of hash map.
Key-value store, pub-sub, streams, and all the add ons...
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 have only used redis to store session and such but this makes me wanna expand upon it. Thank you!!
This is the channel every single software engineer need, I thought I knew Redis... now I know that I know nothing
nice straight forward 'no nonsense' video. Thanks a lot for these!
I like your 100 second video Jeff. I always make sure that I watch your video each day.
in memory db(cahce as relational db)
multimodel db
Google Sheet with Sheet API & Google script is the only database I'm ever going to use...
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
Haven't worked with Reddis for a long time. "Reddis as the main db" is an interesting concept..
Thanks
"you will get your answer when you upload damn tutorial" - Bully Maguire
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.
Wow never thought of using redis as primary database. Thanks a lot
I was waiting for this video for long! Thank you Jeff!
32 nodejs web apps replicas with their own redis and a single redis master, this is fast
I love this short videos
The best ad I have ever seen.
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 :)
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 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
Before I decide a test drive is mandatory. Let's take redis for a ride.
have been using redis for Queue tasks without knowing all of this ! thanks for letting me know this
NATS in 100 sec please. Awesome series :)
This has made me pretty excited about a DB. It seems super scary keeping it in memory though!
Wow, I was about to integrate redis into my stack to speed up mongodb. But now I'm thinking of dropping the mongodb part.
Nice explanation in short time, thanks!
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.
Comparing Redis to SQL is like comparing Bicycle to Train, It won't be much useful beyond basic caching and simple models.
Its excellent for syncing the data from your relational database and serving your get requests through it
I am planning to use Radis as cache layer
This definitely blew my mind. Awesome vid.
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.
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.
Never thought Redis could serve as a primary DB
Cool! Short and sweet! Perfect for quick understanding
This is how universities should teach.
Broo I just learn Redis today from bootcamp, then your video just came up 😳😳
"Fireship" has become a new search engine
Always a great 100-sec explanation.
Though you have explained so much but its only brought down to storing key:value pair!
From today I will see redis from a different angle
I would use Redis as a primary database because it is *SUPER* fast.
Boom so redis can help you get and set data as fast as possible
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.
Ultimate explanation in shot period
Oh damn I was using Redis the traditional way for a long time I didn't know how much it evolved!
The drawback of using redis is of course, it uses RAM persistently and my goodie ol machine can't handle it. But once you are already setup, it is just so good when on production that it makes me cry.
Redis is most amazing technology in the world, I really like it