Memcached Architecture - Crash Course with Docker, Telnet, NodeJS

Sdílet
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

Komentáře • 44

  • @hnasr
    @hnasr  Před rokem +6

    Head to database.husseinnasser.com for a discount coupon to my Introduction to Database Engineering course. Link redirects to udemy with coupon applied.

  • @vfryhn2
    @vfryhn2 Před rokem +30

    I absolutely love this deep long format videos, thank you for sharing your knowledge, keep doing great Hussein!

  • @anshupanda2149
    @anshupanda2149 Před rokem +38

    Nasser, why don't you create a full-fledged course on K8s.

    • @hnasr
      @hnasr  Před rokem +31

      One day Ill dedicate some time to research k8s in depth. Its in my mind.

    • @SephirothPrinceful
      @SephirothPrinceful Před rokem +1

      @@hnasr

    • @kouroshtajallie1366
      @kouroshtajallie1366 Před rokem +1

      @@hnasr NICEEE

    • @FuzailShaikh
      @FuzailShaikh Před rokem +1

      That’ll be awesome

    • @NathanielBabalola
      @NathanielBabalola Před rokem +2

      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.

  • @tanminator_
    @tanminator_ Před rokem +3

    Been waiting for new uploads. Absolutely one of the best channels out there for engineers

  • @satyasamal1179
    @satyasamal1179 Před rokem +2

    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.

  • @buddy.abc123
    @buddy.abc123 Před rokem

    A Sunday morning Hussein upload!
    This will set my Sunday up nicely

  • @jjames7206
    @jjames7206 Před rokem

    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!!👍👍👍

  • @sankalpsangle7987
    @sankalpsangle7987 Před rokem

    Thank you for the demo Hussein. Followed along on the demo with Python instead of Node. I am surprised at how simple Memcached is.

  • @Iogoslavia
    @Iogoslavia Před rokem

    Love your videos! Thank you very much Hussein!

  • @lashakitia8772
    @lashakitia8772 Před 6 měsíci

    Thanks for the video, pretty extensive information for crash ones. you got another follower 👍🏻

  • @Max-zf5ot
    @Max-zf5ot Před rokem

    Thnx for the amazing content. Would love to have similar take on Redis - covering some advance features would be cherry on the top

  • @RushabhWadkar
    @RushabhWadkar Před rokem +7

    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!

    • @bokistotel
      @bokistotel Před rokem

      I was thinking the same thing!

  • @MrZerged
    @MrZerged Před rokem +2

    This was fantastic. I hope you do this for redis too!

    • @hnasr
      @hnasr  Před rokem +3

      Planning too thanks!

  • @quangtung2912
    @quangtung2912 Před rokem

    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

  • @vivekberlia8582
    @vivekberlia8582 Před rokem +3

    Hussein, Please make video on kubernetes.

  • @CrzyGazara
    @CrzyGazara Před rokem +1

    The Memory allocation and Management works exactly the same in PHP assoc array even with the chained LL

  • @niteshjain6644
    @niteshjain6644 Před rokem

    Awesome work man 🙂

  • @shivamsingh1221
    @shivamsingh1221 Před rokem +3

    As always, it's a great video about memcache. Can we have a similar video on redis?

  • @asd848
    @asd848 Před rokem

    Love the Dark Souls mention, one of the best games ever!

  • @barebears289
    @barebears289 Před rokem

    When Hussein Nasser says it's simple, trust me, it's simple

  • @sreejith5966
    @sreejith5966 Před rokem

    Does memcache accept any type of object other than strings.
    If i want to store a json does memeche serialize it by itself ?

  • @MarincaGheorghe
    @MarincaGheorghe Před rokem

    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.

  • @mohamedsimo6021
    @mohamedsimo6021 Před rokem +1

    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

  • @CleytonChagas
    @CleytonChagas Před rokem

    Thanks!

  • @yusufmirkar6508
    @yusufmirkar6508 Před rokem

    Thanks for the video!!. One question how is page of 1 MB has 14563 chunks each of 72 byte 13:25

  • @jhonsen9842
    @jhonsen9842 Před 9 měsíci

    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.

  • @imohitdixit
    @imohitdixit Před rokem +1

    Great stuff Hussein, thanks for knowledge sharing 👍
    Can we expect same detailed video on Redis and Varnish too!

    • @hnasr
      @hnasr  Před rokem +2

      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

    • @AnkushChaddaIndia
      @AnkushChaddaIndia Před rokem +1

      @@hnasr Would be great to compare Redis in the same way like in this video. Thanks for this great video too

  • @neeteshkumarsharma9537

    Please make video to Learn , How to Learn technologies like you.

  • @Waferdicing
    @Waferdicing Před rokem

    💚

  • @Max-zf5ot
    @Max-zf5ot Před rokem

    @Hussein - Discount coupon (for Udemy database course) is actually increasing price by $1 :D :D Is it possible for you to share another code?

    • @hnasr
      @hnasr  Před rokem +1

      Just updated it now. DB-SEP22-1499A

  • @kouroshtajallie1366
    @kouroshtajallie1366 Před rokem

  • @definty
    @definty Před rokem

    Just create a ram disk or an ramfs and put database and the data base program in there.

  • @luis1118
    @luis1118 Před rokem

    So i try to avoid saying slab* -> inmediatelly says slab 1306 times hahahaha