Apache Kafka Crash Course

Sdílet
Vložit
  • čas přidán 1. 06. 2024
  • Apache Kafka is a distributed stream processing software developed by LinkedIn and written in Scala and Java.
    Chapters
    0:00 Intro
    2:32 Kafka Broker
    5:39 Kafka Producer
    7:11 Kafka Consumer
    8:34 Kafka Partitions
    12:50 Queue vs Pub-Sub
    16:47 Consumer Group
    23:06 ZooKeeper
    29:45 Coding Example
    1:02:48 Kafka Pros-Cons
    1:17:00 Summary
    Download slides here
    payhip.com/b/Y0Cq
    (Members get all slides for all my video courses for free)
    In this video I want to focus on the basics of Kafka, talk about how it works give finally spin up a Kafka cluster and write a producer and a consumer.
    Kafka Components
    _ producer
    _consumer
    _topic
    _partition
    How Kafka works
    Example ( Ride sharing )
    Spin Kafka cluster
    Write a producer
    Write a consumer
    Kafka Applications
    Pros and Cons
    Source Code
    github.com/hnasr/javascript_p...
    Docker commands spin up kafka
    //if you ever mess up or you want to start fresh just stop and remove the containers and rerun the command
    docker stop zookeeper kafka
    docker rm zookeeper kafka
    docker run --name zookeeper -p 2181:2181 -d zookeeper
    docker run -p 9092:9092 --name kafka -e KAFKA_ZOOKEEPER_CONNECT=husseinmac:2181 -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://husseinmac:9092 -e KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 -d confluentinc/cp-kafka
    Get my fundamentals of database engineering course link redirects to udemy with coupon applied (database.husseinnasser.com)
    Resources
    KIP 500 (Remove Zookeeper)
    cwiki.apache.org/confluence/d...
    Become a Member on CZcams
    / @hnasr
    🧑‍🏫 Courses I Teach
    husseinnasser.com/courses
    🏭 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...
    🎙️ Mic Gear
    Shure SM7B Cardioid Dynamic Microphone
    amzn.to/3o1NiBi
    Cloudlifter
    amzn.to/2RAeyLo
    XLR cables
    amzn.to/3tvMJRu
    Focusrite Audio Interface
    amzn.to/3f2vjGY
    📷 Camera Gear
    Canon M50 Mark II
    amzn.to/3o2ed0c
    Micro HDMI to HDMI
    amzn.to/3uwCxK3
    Video capture card
    amzn.to/3f34pyD
    AC Wall for constant power
    amzn.to/3eueoxP
    Stay Awesome,
    Hussein
  • Věda a technologie

Komentáře • 594

  • @hnasr
    @hnasr  Před 3 lety +17

    Check out my fundamentals of Database Engineering udemy course with over 20 hours of deep database systems lectures. Head to database.husseinnasser.com for a discount coupon. Link redirects to udemy with coupon applied.

    • @markyoshikawa4278
      @markyoshikawa4278 Před rokem +1

      I love it and the way it’s presented! Will announce on LinkedIn when I get my cert. Thanjs for putting this together!

  • @_sr
    @_sr Před 2 lety +137

    27:28 answer:
    Every broker on a Kafka cluster is also named a Bootstrap Server. All brokers have the metadata required for the clients (producer or consumer) to discover brokers. When a client connects to one of the brokers (which are already configured as bootstrap servers in the Kafka configuration) it makes a "metadata request". The response includes information about topics, partitions, leader brokers, etc. Once the client gets this info, then - in the case of a producer- it makes the write request directly to the leader broker for that specific partition.

  • @mikejeffery8371
    @mikejeffery8371 Před 3 lety +16

    This was an awesome tutorial. You're incredibly good at explaining things and keeping people engaged when consuming so much information.

  • @stmasanti
    @stmasanti Před 4 lety +6

    One of the best tutorials i’ve seen. Great class and very funny. Subscribed and waiting for more content!

  • @mubashirimtiaz3836
    @mubashirimtiaz3836 Před 10 měsíci +3

    I just wanted to express my heartfelt appreciation for the amazing Kafka crash course, Your dedication to simplifying complex topics shines through, and I can't thank you enough for making Kafka so much easier to understand.

  • @eduardotp541
    @eduardotp541 Před rokem

    Not only the content, but the way you say it, and your enthusiasm, is something else. You sir deserve all the best, because you are, with no doubt, in the better's shelf..

  • @frontend-ops
    @frontend-ops Před 3 lety +1

    Just started watching and already loving it. I wish you a happy new year and hoping to see more great content like this.

  • @manishbolbanda9872
    @manishbolbanda9872 Před 2 lety +1

    i had to deal with Kafka in one of my project, so searched for some tutorials, As soon as I saw that you have made a video on this, i had a sense of relief that i dont have to worry about the resource atleast. Thanks for all your efforts man.

  • @ershad003
    @ershad003 Před rokem +5

    Sweeeeet... did not feel like a tutorial, but like a friendly chat between deeply connected friends, every word makes clear sense. Kept me engaged every second till the end, yes I made to the end. Well done Sire... 👏👏👏

  • @bokilsbk23
    @bokilsbk23 Před 27 dny

    Great tutorial as always. Literally a crash course fit into about an hour. Has everything to get started with kafka, especially because of the hands on.

  • @asht7290
    @asht7290 Před 2 lety +1

    Dude, I made it to the End. You kept us engaged throughout. I have soo much to learn about Comp Sci!

  • @aatifbangash
    @aatifbangash Před 4 lety +15

    Another perfect tutorial. Everything is explained very nicely. Thanks for making Kafka easy to understand in this tutorial.

    • @hnasr
      @hnasr  Před 4 lety

      Atif Ali thanks Atif for your support! Happy I could make such complex topic easy to absorb.. still I didnt cover all what kafka has to offer! Cheers

  • @myviewsmyreviews2001
    @myviewsmyreviews2001 Před 3 lety +1

    Amazing tutorial! Really find the topic interesting and easy to understand broker, producer, consumer etc.. Thanks for coming up with a great video. Hope we will get to see more on this.

  • @ilyakushlianski6519
    @ilyakushlianski6519 Před 2 lety

    Amazing, Hussein! Thanks for the overview of Kafka. I've always been a bit afraid of this beast, but now I understand at least the basics

  • @jithin_zac
    @jithin_zac Před 3 lety +67

    I always got demotivated by the complexity I experienced when I tried to learn this on my own but this one is a gem. I know it might have taken a lot of learning and experience for you to explains this in a simple manner Nevertheless thank you for sharing your knowledge!

    • @hnasr
      @hnasr  Před 3 lety +10

      Thank you Jithin! And Remember to ask in the community to get access to the slides if you would like to since you are a member❤️

  • @psuter80
    @psuter80 Před 2 lety +1

    thank you, this video was a great intro to understand what kafka is and how it works for a complete noob :)
    here is a docker-compose.yml that starts your two ontainers in case anybody wants to use that to go through your examples. basically i just took your two lines and converted them to compose.
    version: '3'
    services:
    zookeeper:
    image: zookeeper
    restart: always
    ports:
    - "2181:2181"
    kafka:
    image: confluentinc/cp-kafka
    restart: always
    ports:
    - "9092:9092"
    environment:
    KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
    KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://localhost:9092'
    KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: '1'
    another addon: create a copy of consumer.js and edit the group name.. start that in parallel with the two consumer.js processes which then demonstrates pub sub behavior.
    i write all this one and a half hour after not even knowing what the difference between a queue and pub sub is and what kafka and zookeeper are :) .. this just shows how good this tutorial was :)

  • @jasonngan5747
    @jasonngan5747 Před 2 lety +1

    The explanation and illustration is clear and concise! Thanks for the comprehensive tutorial!

  • @nimasoufiloo2626
    @nimasoufiloo2626 Před 3 lety +1

    Couldn't learn kafka better in such a short time. Thanks Hussein.

  • @yuanqingzhang3648
    @yuanqingzhang3648 Před 2 lety

    This course is great because of the example. It's much better than some videos in which only some introductions are represented.

  • @a.yashwanth
    @a.yashwanth Před rokem

    You explain by answering all the questions people get when learning a topic. Most tutorials just explain concepts.

  • @MOHDSALMAN-sj2zu
    @MOHDSALMAN-sj2zu Před 3 lety +13

    I made it to the end. :P Thank you so much for the amazing content Hussein.

  • @alexsiuwh
    @alexsiuwh Před 2 měsíci

    this is the only tutorial i found that go in the depth and details of a pro should know , and i can compare Kafka with other messaging system like JMS and MQ. Thanks so much for sharing👍👏🙏

  • @nihinlola
    @nihinlola Před 2 lety +1

    Excellent practical explanation of Kafka, I wish every technical tutorial was as easy as this. Thumbs up!

  • @user-lq7yg5ej1u
    @user-lq7yg5ej1u Před 10 měsíci +1

    This is well detailed even for a beginner, I completely understand whats going on. Brilliant content.

  • @beatagryczka7108
    @beatagryczka7108 Před 3 lety +3

    Amazing video! You have the talent to explain the complicated stuff really clearly😊

  • @satalkar
    @satalkar Před 3 lety +55

    I rarely comment on videos but this was genuinely one of the best computer science tutorials I've ever seen!

    • @hnasr
      @hnasr  Před 3 lety +5

      Thank you Anish for taking the time to write this appreciate you!

  • @rubensingh6809
    @rubensingh6809 Před 2 lety

    bro your tone when explaining these videos are so good. Didn't even feel like someone was teacahing me. It was as if a friend was talking to me lol. Good job man. Your excitement is intoxicating. :)

  • @atexnik
    @atexnik Před 3 lety +1

    This is the BEST educational channel!!! Bravo!

  • @sy5294
    @sy5294 Před 3 lety +2

    Your skillset is brilliant, amazing and fantastic. Thank you so much!

  • @luqmansen
    @luqmansen Před 4 lety +2

    I just watched your RabbitMQ crash course and at the end of the video you mention how Kafka better at some point, then I bumped into this great video. Very clear explanation, love your video!

    • @hnasr
      @hnasr  Před 4 lety +1

      Luqman S thanks Luqman! Each software its use cases, I think RabbitMQ Is trying to be more than it really is (a message queue) where as kafka was designed to be a pub/sub and a message queue. If your app needs a queue and a pub/sub (or maybe streaming) than Kafka . If you just need a queue RabbitMQ is the way to go and kafka will be an overkill I think..
      I would even consider zeromq as a lightweight mq..
      Good luck!

  • @manishtanwar4803
    @manishtanwar4803 Před 2 lety

    made it to end. Amazing video. you made Kafka look so simple, and the best part-> you showed a code demo. clap. clap.

  • @peternamagonya5310
    @peternamagonya5310 Před rokem

    I made it to the end. Followed every step and it worked nicely. Thank you for the effort... really helpful

  • @ibknl1986
    @ibknl1986 Před 2 lety

    I made it to the end. Excellent. I don’t remember which video previously I saw was so long MD not boring at all. In fact you made it so interesting. May Allah (God) guide and bless you.

  • @linwang7476
    @linwang7476 Před 2 lety

    Very nice tutorial. Got a clear understanding of Kafka, especially the part of queue, pub sub, very helpful! Thank you so much!

  • @nidalshater4027
    @nidalshater4027 Před rokem

    Watched this video in one session, also applied the practice on my machine, what a great content you are creating Hussien, a must rewatch as always 😉

  • @93kazem
    @93kazem Před 4 lety +11

    Thank you for this, don't know how I missed it

  • @vbrtrmn
    @vbrtrmn Před 3 lety +2

    Great video, thanks for making it. Love your accent! You're very easy to understand, follow, and your excitement is fantastic!

    • @hnasr
      @hnasr  Před 3 lety

      vbrtrmn glad to know thank you! Lots of people have trouble with my accent glad you like it!

  • @abhasupadhayay6420
    @abhasupadhayay6420 Před 3 lety

    Really amazing!!! So many concepts explained in an easy and interesting way. Please keep up the great work.

  • @robbenbahati
    @robbenbahati Před měsícem

    made it to the end, and every detail was fully explained thanks.

  • @priyaranjankumarverma2341

    I really appreciate you from my deep of heart for explaining such complex concepts in super simple way, Excellent :)

  • @mutasworld
    @mutasworld Před rokem

    I made it to the End! Thank you for that video, I can now say I understand Kafka a lot better than 1 hour ago :)

  • @ComisarioLobo
    @ComisarioLobo Před 3 lety +1

    Man, you are the best, thanks a lot for creating such valuable content for free

  • @hirenjoshi2198
    @hirenjoshi2198 Před 2 lety

    Amazing explanation Hussein. Every single bit of your lecture is fully understandable. You made difficult thing easy with practical example. You rocked! Good Luck.

  • @shantnukumar1642
    @shantnukumar1642 Před rokem +1

    Made it to the end! Awesome video Hussein :)

  • @hvuupadhyay5418
    @hvuupadhyay5418 Před rokem

    Made it to the end! Yay! Nice video Hussein!

  • @rogergarza5378
    @rogergarza5378 Před 2 lety

    You are a hero, Hussein. I spent two afternoons with you on this tutorial and it was an absolute pleasure. Thank you!

    • @hnasr
      @hnasr  Před 2 lety

      Glad you enjoyed it ❤️

  • @bhaveshgujarathi926
    @bhaveshgujarathi926 Před rokem

    made it to the end 🤟. It was a very good explanation with great clarity. Really Appreciate your work! Thanks a lot 🙏

  • @mikaeledebro1144
    @mikaeledebro1144 Před 3 lety

    Great explanation and overview over the possibilities of Kafka! Looks like a cool technology!

  • @amizan8653
    @amizan8653 Před 3 lety

    This is explained simply and perfectly. Thank you for posting this.

  • @flippolis71
    @flippolis71 Před rokem

    This is a great video to understand what Kafka is and how it works, very well explained!

  • @t529615
    @t529615 Před 3 lety

    By far the best introduction video to Kafka I have seen. Great examples and nice build up to demos that puts theory into practice.

    • @hnasr
      @hnasr  Před 3 lety

      Hans-Jacob Melby thanks Hans!

    • @t529615
      @t529615 Před 3 lety

      @@hnasr One question though.. Shouldn`t the consumer allways get all messages in the topic (within its partition)? I can see that the property "fromBeginning" i set to true, but when i restart the consumer, it still waits for new mesages. It does not replay the old ones?

  • @alishoman2826
    @alishoman2826 Před 3 lety

    the simplest and best tutorial ever!! Good Job

  • @susmitvengurlekar
    @susmitvengurlekar Před 2 lety

    Made it till the end !
    You can explain something in a super simple manner if and only if you understand it
    And you do, Thanks !

  • @abrahammoyo2939
    @abrahammoyo2939 Před 3 lety

    Hussein, You are a legend!!! Any one can be a master if they follow to your conversations. I like the way yo have a full conversation with yourself - such a good dialogue asking and answering yourself

    • @hnasr
      @hnasr  Před 3 lety

      Thank you! I am happy you noticed the conversation style, i have been working on it 😊

  • @obiwanus
    @obiwanus Před 3 lety

    Huge props for trying to understand things before you teach them!

  • @stefanmiller5818
    @stefanmiller5818 Před 2 lety +2

    You really know how to do tutorials, great video!

  • @gokulkpeethu6642
    @gokulkpeethu6642 Před 10 měsíci

    The best stuff on kafka . Made it so simple

  • @amirhosseinmoayedi6205
    @amirhosseinmoayedi6205 Před 8 měsíci

    truly amazing-so simple and incredibly useful. Great job!

  • @prakharvijay8853
    @prakharvijay8853 Před 2 lety +1

    Made it to the end, now gonna implement the backend of a texting app using Kafka

  • @emanuel0723
    @emanuel0723 Před 4 lety

    Enjoyed following this... as always, thanks Hussein!

  • @simonhuang1357
    @simonhuang1357 Před 3 lety

    I made it to the end. Thanks for the tutorial, it was very informative and I appreciate your efforts.

  • @shivangitomar5557
    @shivangitomar5557 Před 2 lety

    This is THE BEST video on this topic. Thanks a lot!

  • @Goodwin454
    @Goodwin454 Před 2 lety

    I was looking for your channel , you really good at explaining things you helped me once , I'm here again , thank you andn jazkAlllah khayran .

  • @shubhamchandra336
    @shubhamchandra336 Před 3 lety +2

    Really enjoyed this informative session and yeah, made it to the end !!!

  • @mosespeter9711
    @mosespeter9711 Před 2 lety

    I made it to the End!!! Thanks so much Hussein!

  • @adilsheikh9916
    @adilsheikh9916 Před rokem

    Appreciate your efforts...like the way you clearly say what you know/understand & what you dont...else I see most people in Industry are faking the intelligence & understanding about any technology & they pretend it so perfectly like they themselves have developed that tech...while those who actually know/understand the tech properly are very few & rare...
    So always good to watch your videos to understand something in simple words rather mugging those funky & techie words.

  • @crypto-saiyan9283
    @crypto-saiyan9283 Před rokem

    Today i understood, its not the subject its the way of teaching...thanks for sharing this wonderful knowledge

  • @DavidBwire
    @DavidBwire Před rokem

    Thank you for putting in the effort to make a short and clear to understand video.

  • @johnshaheen3862
    @johnshaheen3862 Před 3 lety +2

    professionalism + enthusiasm + enjoyment + wonderful content= Hessein Nasser

    • @hnasr
      @hnasr  Před 3 lety +1

      John Shaheen you make me blush John 😊 thanks !!

  • @wanitooo
    @wanitooo Před rokem

    Amazing video. A gifted teacher like this is quite rare ♥Thanks a lot!!
    btw made it to the end 😆

  • @pongching8697
    @pongching8697 Před 3 lety

    Clear and easy to understand. Although it's a long video, but not boring at all.

  • @PrashantKhanolkarUSA
    @PrashantKhanolkarUSA Před rokem

    Amazing video, you have made a complex topic extremely simple with your style of teaching.

  • @xonmaina
    @xonmaina Před rokem

    Thanks Nasser I ve made it to the end. wonderful stuff

  • @stevensonicteam
    @stevensonicteam Před 5 měsíci

    Thank you. Best video so far for learning kafka. 👍

  • @jassinakhlaqi5474
    @jassinakhlaqi5474 Před 2 lety

    Thank you for this amazing channel. I enjoy watching your videos and learning more.

  • @sonjoychakraborty571
    @sonjoychakraborty571 Před rokem

    Awesome, such an wonderful session and easy way to represent can only be possible by Hussain Nasser only. It truly cleared lot's of my confusions. Hats Off. Keep up going ..

  • @princeabdul4290
    @princeabdul4290 Před 3 lety

    Brother you're videos are phenomenal they are just top notch.

  • @zmm1337
    @zmm1337 Před 4 lety +180

    how do you only have 23k subs?? you're so good at explaining difficult concepts, tysm!

  • @umair.ramzan
    @umair.ramzan Před 3 lety +1

    made it to the end :))) Thank you Hussein, you are the best!!

  • @saurabhdeshpande8450
    @saurabhdeshpande8450 Před 2 lety

    Best explanation of Kafka on the internet!

  • @sindhumohana6164
    @sindhumohana6164 Před 2 lety +1

    Amazing video Hussein ! The way you explain helps to register the information in our memory :-)

  • @atharwaadawdakar4144
    @atharwaadawdakar4144 Před 2 lety

    Thank you so much for such a crystal clear and crisp explanation !!

  • @thabetsabha6292
    @thabetsabha6292 Před 2 lety

    Thank you, amazing tutorial as always! btw you mentioned that replicas can improve performance, I might be mistaken, but from what I understand, Kafka uses Clusters as a fail-over mechanism only, and they don't actually increase performance as all the reads & writes go to the leader.

  • @souravsarker3913
    @souravsarker3913 Před 3 lety

    Really.. amazing contents... Finally i could understand kafka works and specially consumer groups...

  • @hey.............
    @hey............. Před rokem +1

    Thank you man!
    Really appreciate the hardwork.

  •  Před rokem

    Excellent tuto Hussein! Thanks a lot.

  • @satheeshprabhakaran5330
    @satheeshprabhakaran5330 Před 2 lety +1

    Made it to the end!! Amazing content!

  • @jongxina3595
    @jongxina3595 Před rokem

    best video on kafka. Thanks a ton!

  • @mzaman8660
    @mzaman8660 Před 4 lety +1

    This is brilliant and concise. Been looking for a channel like this 👍🏾

    • @hnasr
      @hnasr  Před 4 lety

      M Zaman enjoy the content 🙏

  • @pavankumardittakavi5325

    So much quality content. Thanks a lot Hussein.

  • @kramnedski1988
    @kramnedski1988 Před 3 měsíci

    I appreciate the content. no boring part :)

  • @vispharaon
    @vispharaon Před rokem

    I made it to the end :) great tutorial, thanks!

  • @ibrahimibrahim1991
    @ibrahimibrahim1991 Před 3 lety

    Thank you Hussein, it's a great introduction to Kafka

  • @PramodKumar-hu7mt
    @PramodKumar-hu7mt Před rokem

    It's good that you included jordan speech...i was just googled that video and came back

  • @neru4557
    @neru4557 Před 3 lety +1

    Just watched it straight 1 hours 18 minutes during night without skipping.

    • @hnasr
      @hnasr  Před 3 lety

      Hero! I apologies for the light background on my slides that must have hurt the eyes :( I switched to dark mode on my future videos..

  • @hangduong6683
    @hangduong6683 Před rokem

    oh my god I love this video so much =]] this is such an amazing tutorial and how funny the instructor is : D

  • @adewaleShotobi
    @adewaleShotobi Před rokem

    Made it to the end 😁. Thank you!

  • @murthymaganally1090
    @murthymaganally1090 Před 2 lety

    Great Videos on Kafka, Very Nice. Fantastic

  • @thecloudterminal
    @thecloudterminal Před rokem

    This is amazing! Thank you for creating this

  • @santiagobustamante970

    Thank you Hussein!! Great explanation as always!