What makes Kafka special? | System Design

Поділитися
Вставка
  • Опубліковано 6 лип 2024
  • Visit Our Website: interviewpen.com/?...
    Join Our Discord (24/7 help): / discord
    Like & Subscribe: / @interviewpen
    You've probably heard about Kafka, but you really know why everyone is so excited about it? This video dives into the low-level details of what makes Kafka fundamentally different from other message queue systems, and when you should use it over other solutions.
    If you liked this video and want to learn more about fundamental systems and how they can be used to solve problems, check out our full course on interviewpen.com/?... !
    Table of Contents:
    0:00 - Introduction
    0:13 - Message Queues
    1:32 - Message Routing
    2:03 - Kafka Behavior
    2:37 - Consumer Offsets
    3:25 - Sequential Disk Access
    4:51 - Use Cases
    6:02 - interviewpen.com
    Socials:
    Twitter: / interviewpen
    LinkedIn: / interviewpen
    Website: interviewpen.com/?...

КОМЕНТАРІ • 38

  • @prashantkumardhotre5695
    @prashantkumardhotre5695 21 день тому

    What I like most about your videos is that they are short, crisp, to the point, great visuals and no BS

  • @harisridhar1668
    @harisridhar1668 3 місяці тому +3

    Thanks for really going over the differences between Kafka versus TMQs - Traditional Message Queues - in this video. It helps to understand Kafka for its benefits with retention, replay, and fanout delivery pattern to multiple consumer nodes/services.
    Also I like your presentation style and the use of multiple colors to highlight the many components and network passing going.

  • @48_subhambanerjee22
    @48_subhambanerjee22 3 місяці тому +3

    Bro... This is like OS... Semaphoring with producer consumer... There also you send process PCB into queue and when queue is full producer sleeps and when empty reciever sleeps

  • @mertbozkir
    @mertbozkir 3 місяці тому +2

    I appreciate you, awesome channel!

  • @shaikhmubin02
    @shaikhmubin02 3 місяці тому +2

    Bro you are doing a great job, keep it up💪🏻

  • @sanketagarwal8570
    @sanketagarwal8570 3 місяці тому

    The content is just too good!

  • @Labandusette
    @Labandusette 3 місяці тому

    thank you very much !

  • @pieter5466
    @pieter5466 3 місяці тому

    Another great video. A great follow up might be Samza. [edit: Samza as a example of stream processing between queues]

    • @interviewpen
      @interviewpen  3 місяці тому

      We'll add it to the backlog! Thanks for watching.

  • @AshrafMMA
    @AshrafMMA 3 місяці тому

    Wow.. now I get why it so much more scalable .
    How do you determine size of queue, and will you cover usages of multiple queues in kafka?

    • @interviewpen
      @interviewpen  3 місяці тому

      We have a full video about using queues in large scale systems on interviewpen.com :)

  • @martyallen3801
    @martyallen3801 3 місяці тому

    RabbitMQ also provides exchanges and fanout, right? What's the big difference between them in that case?

    • @interviewpen
      @interviewpen  3 місяці тому

      Yep--Rabbit would be classified as a traditional MQ involving exchanges and messages delivered to one consumer.

  • @rustix3
    @rustix3 3 місяці тому

    4:08 Wow the page cache of the operating system need another video on its own. How does it caches, what strategy it uses? What happens if the consumer becomes available and Kafka need to re-read all previous messages? Do OS cache stores anough of messages, should or even can it be twicked?

    • @interviewpen
      @interviewpen  3 місяці тому +1

      Yes--tons of OS level enhancements can be made to optimize for specific usage patterns. This is an advanced topic, but we're working on expanding our coverage of these sorts of things in our course at interviewpen.com . Thanks for watching!

  • @rustix3
    @rustix3 3 місяці тому

    3:01 What just happened? Did the offset below(which is the offset for Consumer below) just went directly through 1 and 2? Or was it going through 1 at the same time as the Offset above was going through 1? I mean the offsets and consumers work in parallel, right?

    • @ygormartinsr
      @ygormartinsr 3 місяці тому

      The second consumer hadn't pulled data from the queue yet, so its offset was still at 0. Once it did it received the two events that were sitting there

    • @interviewpen
      @interviewpen  3 місяці тому +1

      Messages can be received by consumers in batch, so when the second consumer polled, it received both messages.

  • @69k_gold
    @69k_gold 3 місяці тому

    So because we have the event dequeueing in traditional MQ we are losing the throughput capabilities?

    • @interviewpen
      @interviewpen  3 місяці тому

      It's really more about messages being removed from the queue once consumed--this results in different consumer semantics but makes it harder to optimize for throughput at an OS level. Hope that helps!

  • @imnormal-sl8mj
    @imnormal-sl8mj 3 місяці тому

    Hi, I still don't get why Kafka can get much higher throughput than to traditional MQ, is it because of its scalability? If so, why isn't traditional MQ more scalable?

    • @interviewpen
      @interviewpen  3 місяці тому +1

      Kafka efficiently uses optimizations built into the operating system, such as sequential disk access and the page cache. For reference, this is covered at 3:25 in the video--thanks for watching!

  • @elstp2
    @elstp2 3 місяці тому

    please an review of account system

    • @interviewpen
      @interviewpen  3 місяці тому

      Is this what you're looking for? ua-cam.com/video/uj_4vxm9u90/v-deo.htmlsi=eaD-ZVsmh2Ha2q3N

  • @santoshpinisetty7796
    @santoshpinisetty7796 3 місяці тому

    But wouldn't saving all msg waste memory how does it handle the it

    • @abhishek_ar97
      @abhishek_ar97 3 місяці тому

      Default time is 7 days, after which the message gets deleted. You can find them in the kafka-config file

    • @interviewpen
      @interviewpen  3 місяці тому

      Kafka will automatically delete old messages when it runs out of space :)

  • @yuzhao5268
    @yuzhao5268 25 днів тому

    helpful but shallow. there's gotta be more details. what if the machines running the queues crash? What if publisher publishes faster than consumer consumes? what protocol is used to communicate? if multiple producers are producing, what orders are enforced?

    • @interviewpen
      @interviewpen  24 дні тому

      If you want an in-depth video on how queues are used in fault-tolerant systems, check out interviewpen.com :)

  • @quentin7343
    @quentin7343 3 місяці тому

    How old are you? :O

  • @siux94
    @siux94 3 місяці тому

    You misrepresented "traditional" MQs.