How I built a mini version of Redis: Concurrency, TCP and snapshot persistence explained!
HTML-код
- Опубликовано: 8 фев 2025
- Golang implementation source code github.com/ant...
Mysql as redis vs redis article dkomanov.mediu...
[Table of contents]
00:00 Intro
00:15 What is a redis application
01:00 Interacting with redis with redis-cli and python library
03:37 Other redis traits
04:05 Why store data in memory?
14:20 The TCP protocol
23:50 RESP - Redis Protocol
43:20 Why cache as an standalone application?
17:05 Saving snapshots
50:10 Code review of my redis implementation
01:06:27 Testing my implementation of redis
01:08:10 Benchmark redis x my implementation
01:10:43 Conclusion
Sounds delicious to watch later
[Table of contents]
00:00 Intro
00:15 What is a redis application
01:00 Interacting with redis with redis-cli and python library
03:37 Other redis traits
04:05 Why store data in memory?
14:20 The TCP protocol
23:50 RESP - Redis Protocol
43:20 Why cache as an standalone application?
17:05 Saving snapshots
50:10 Code review of my redis implementation
01:06:27 Testing my implementation of redis
01:08:10 Benchmark redis x my implementation
01:10:43 Conclusion
Pin this 📌📌📌
@@BlackBirdOverflow I can't because my youtube account is not verified, yet. But, I'm working on it. Thanks for the feedback.
@ Ohh, great video anyway
Most unique and embassy content about redis in youtube
Amazing thing
Thanks Tahsin!
Hello Leo! (think you are also brazillian, am I right? ótimo video parça) this video is being very useful, and I would like to share some things about my experience building a redis copy in go, inspired by your video:
The first and most important thing: The number at the beggining of the sequence of data types in the protocol is a solution to remove the necessity to build a Lexer, that would thake some processing time to transform the values passed to each command, and shrink it to the minimum. How is this possible? Well, in a common lexer, the usual process is to build tokens, and if those tokens are already processed by the client, by pre-processing the length of each element and then building the message for the protocol, this would remove the time that the service would have to take to just interpret the input.
The second: I infact didnt do this lol, and got into a time compelxity different from the minimum taken by Redis servers.
Brabo
Valeu Alysson!
ive noticed a lot more coders (actual coders who have some deep knowledge) start their youtube channel. Has anyone else also noticed the same ?
We are leaving the caves the and basements one spray 😅
Start your channel as well. Is fun and helps a lot learning more stuff!
awesome stuff
Thanks Daniel!
Great video, Leo. What do you plan on doing for the next video?
Thanks! Next video I will react a postgres performance issue article, the video should be release in a few minutes, check it out!
In the meantime, I'm preparing more hammers like this one, but, those types of videos require some time to prepare. The next one of this type, will be about load balancers
@@LeoAntunesTekkQuality needs time. Do your best job. Btw it sounds interesting. I am already using nginx as a load balancer.
Test against PostgreSQL, read, writes, curious if it's faster
Thanks for the feedback ordinarygg. What exactly would you like to test against to? The redis-server x postgres, similar to the benchmark article that I've reacted in the video?
@@LeoAntunesTekk The idea is that PostgreSQL actually using OS pages cache for queries, so if you do basic SELECT key, value ... it will use memory as well. If tuned correctly can easily get 500k/sec reads and support shared locks as well. Not saying it should be faster, but it's interesting to compare. I'm thinking to benchmark it
Got it, awesome idea. If you benchmark it, let me know.