Memcached Architecture - Crash Course with Docker, Telnet, NodeJS
Vložit
- čas přidán 3. 06. 2024
- Memcached is an in memory cache with one major feature be a transient cache. Memcached has a very simple design. It was originally designed to help with database load by storing the query result in memory to avoid further querying the database. By default it has no authentication, a simple text protocols, servers don’t talk to each other. This video discuss the architecture of the cache, design choices and have some critics of the design choices. I go through a demo at the end using docker, telnet and nodes. Enjoy
Fundamentals of Database Engineering udemy course (link redirects to udemy with coupon)
database.husseinnasser.com
Download the slides for Memcached course here
payhip.com/b/rw14l
(Members get all slides for all my video courses for free)
0:00 Intro
4:40 What is Memcached?
7:45 Memory management
16:00 LRU
25:17 Threading and Connections
30:40 Read Example
34:30 Write Example
36:17 Write and Read collisions
39:40 Locking
40:30 Distributed Cache
43:30 Memcached with Docker/Telnet/NodeJS
45:00 Spin up a Memcached Docker container and telnet
52:17 Memcached and NodeJS
56:15 Four Memached Servers with NodeJS
01:01:00 Summary
Source Code
github.com/hnasr/javascript_p...
Resources
www.cloudflare.com/learning/d...
holmeshe.me/understanding-mem...
github.com/memcached/memcache...
docs.oracle.com/cd/E17952_01/...
holmeshe.me/understanding-mem...
docs.oracle.com/cd/E17952_01/...
support-acquia.force.com/s/ar...
www.alibabacloud.com/blog/red...
www.usenix.org/system/files/c...
memcached.org/blog/persistent...
memcached.org/blog/modern-lru/
• Intro To Memcached
Fundamentals of Networking for Effective Backends udemy course (link redirects to udemy with coupon)
network.husseinnasser.com
Introduction to NGINX (link redirects to udemy with coupon)
nginx.husseinnasser.com
Python on the Backend (link redirects to udemy with coupon)
python.husseinnasser.com
Become a Member on CZcams
/ @hnasr
Arabic Software Engineering Channel
/ @husseinnasser
🔥 Members Only Content
• Members-only videos
🏭 Backend Engineering Videos in Order
backend.husseinnasser.com
💾 Database Engineering Videos
• Database Engineering
🎙️Listen to the Backend Engineering Podcast
husseinnasser.com/podcast
Gears and tools used on the Channel (affiliates)
🖼️ Slides and Thumbnail Design
Canva
partner.canva.com/c/2766475/6...
Stay Awesome,
Hussein - Věda a technologie
Head to database.husseinnasser.com for a discount coupon to my Introduction to Database Engineering course. Link redirects to udemy with coupon applied.
I absolutely love this deep long format videos, thank you for sharing your knowledge, keep doing great Hussein!
Nasser, why don't you create a full-fledged course on K8s.
One day Ill dedicate some time to research k8s in depth. Its in my mind.
@@hnasr
@@hnasr NICEEE
That’ll be awesome
Lol you didn't frame this statement or question well.
You should ask if he's willing to create a full fledged course on K8s and not negate that he doesn't want to , and then ask why.
I don't think you're paying him to create courses.
Been waiting for new uploads. Absolutely one of the best channels out there for engineers
I never watch any tutorial videos longer that 30 mins, I prefer reading in that case.
but your videos are pure exception, I just can't pause or quit the video. Thanks man
Keep sharing your knowledge.
A Sunday morning Hussein upload!
This will set my Sunday up nicely
Hussein ! You did a great job again!!! I tried to find Memcached course many years ago , It was not hard to find and not fully expained. Thanks Thanks!!👍👍👍
Thank you for the demo Hussein. Followed along on the demo with Python instead of Node. I am surprised at how simple Memcached is.
Love your videos! Thank you very much Hussein!
Thanks for the video, pretty extensive information for crash ones. you got another follower 👍🏻
Thnx for the amazing content. Would love to have similar take on Redis - covering some advance features would be cherry on the top
Excellent content. One suggestion, How about creating an in-depth course on linux buffers, processes, kernel, file descriptors, pids etc. It would be fun to learn those!
If you have any recommendations, please shoot!
I was thinking the same thing!
This was fantastic. I hope you do this for redis too!
Planning too thanks!
Memcached does NOT use one-thread per one connection model.
Instead, threads deal with connections are called "worker threads".
Which using libevent that support multiple connections per thread (using epoll underneath).
Number of worker threads often be set to number of cores.
Also slab allocator made memcached a much better cache than Redis, which relied on jemalloc
Hussein, Please make video on kubernetes.
The Memory allocation and Management works exactly the same in PHP assoc array even with the chained LL
Awesome work man 🙂
As always, it's a great video about memcache. Can we have a similar video on redis?
Love the Dark Souls mention, one of the best games ever!
When Hussein Nasser says it's simple, trust me, it's simple
Does memcache accept any type of object other than strings.
If i want to store a json does memeche serialize it by itself ?
You mentioned memory fragmentation. You don't want it fragmented at a specific allocation because allocation functions give you a continuous block (not a list of blocks). That makes sense as , if you store an array there the block needs to be contiguous in process virtual memory.
regarding to webrtc can you please talk about how the conference apps can record the webrtc streams and merge them to one file including avatar image when user has disabled audio & video also how they can publish all this changes to a live stream like youtube etc ..
so it would be great if you talk about advanced webrtc
Thanks!
Thanks for the video!!. One question how is page of 1 MB has 14563 chunks each of 72 byte 13:25
Your Content is Excellent and so affordable in Udemy. Now a days some content creaters are selling their content at Huge Price. If you can create Kafka and Redis in Udemy series it would be great.
Great stuff Hussein, thanks for knowledge sharing 👍
Can we expect same detailed video on Redis and Varnish too!
Thanks! You know what, now looking back at my Redis and Varnish videos I realized how weak they are. (I guess its a reflection of my knowledge back then) I think there are alot that I don’t know about Redis internals now that I read on memcached
@@hnasr Would be great to compare Redis in the same way like in this video. Thanks for this great video too
Please make video to Learn , How to Learn technologies like you.
💚
@Hussein - Discount coupon (for Udemy database course) is actually increasing price by $1 :D :D Is it possible for you to share another code?
Just updated it now. DB-SEP22-1499A
Just create a ram disk or an ramfs and put database and the data base program in there.
So i try to avoid saying slab* -> inmediatelly says slab 1306 times hahahaha