Memcached Architecture - Crash Course with Docker, Telnet, NodeJS

Поделиться
HTML-код
  • Опубликовано: 20 июн 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 RUclips
    / @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
  • НаукаНаука

Комментарии • 44

  • @hnasr
    @hnasr  Год назад +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 Год назад +30

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

  • @anshupanda2149
    @anshupanda2149 Год назад +38

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

    • @hnasr
      @hnasr  Год назад +31

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

    • @SephirothPrinceful
      @SephirothPrinceful Год назад +1

      @@hnasr

    • @kouroshtajallie1366
      @kouroshtajallie1366 Год назад +1

      @@hnasr NICEEE

    • @FuzailShaikh
      @FuzailShaikh Год назад +1

      That’ll be awesome

    • @NathanielBabalola
      @NathanielBabalola Год назад +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.

  • @satyasamal1179
    @satyasamal1179 Год назад +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.

  • @tanminator_
    @tanminator_ Год назад +3

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

  • @buddy.abc123
    @buddy.abc123 Год назад

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

  • @jjames7206
    @jjames7206 Год назад

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

  • @vivekberlia8582
    @vivekberlia8582 Год назад +3

    Hussein, Please make video on kubernetes.

  • @sankalpsangle7987
    @sankalpsangle7987 Год назад

    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 Год назад

    Love your videos! Thank you very much Hussein!

  • @lashakitia8772
    @lashakitia8772 6 месяцев назад

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

  • @Max-zf5ot
    @Max-zf5ot Год назад

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

  • @shivamsingh1221
    @shivamsingh1221 Год назад +3

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

  • @MrZerged
    @MrZerged Год назад +2

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

    • @hnasr
      @hnasr  Год назад +3

      Planning too thanks!

  • @RushabhWadkar
    @RushabhWadkar Год назад +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 Год назад

      I was thinking the same thing!

  • @niteshjain6644
    @niteshjain6644 Год назад

    Awesome work man 🙂

  • @barebears289
    @barebears289 Год назад

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

  • @quangtung2912
    @quangtung2912 Год назад

    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

  • @CrzyGazara
    @CrzyGazara Год назад +1

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

  • @asd848
    @asd848 Год назад

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

  • @mohamedsimo6021
    @mohamedsimo6021 Год назад +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 Год назад

    Thanks!

  • @MarincaGheorghe
    @MarincaGheorghe Год назад

    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.

  • @sreejith5966
    @sreejith5966 Год назад

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

  • @yusufmirkar6508
    @yusufmirkar6508 Год назад

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

  • @jhonsen9842
    @jhonsen9842 10 месяцев назад

    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.

  • @neeteshkumarsharma9537
    @neeteshkumarsharma9537 Год назад

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

  • @imohitdixit
    @imohitdixit Год назад +1

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

    • @hnasr
      @hnasr  Год назад +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 Год назад +1

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

  • @Waferdicing
    @Waferdicing Год назад

    💚

  • @Max-zf5ot
    @Max-zf5ot Год назад

    @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  Год назад +1

      Just updated it now. DB-SEP22-1499A

  • @kouroshtajallie1366
    @kouroshtajallie1366 Год назад

  • @definty
    @definty Год назад

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

  • @luis1118
    @luis1118 Год назад

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