Apache Kafka Key Terminologies and Architecture Internal Working | Features | In Depth Explanation

In this video of code decode we have kafka architecture which is very important in terms of kafka interview questions and answers
Udemy Course of Code Decode on Microservice k8s AWS CICD link:
openinapp.co/udemycourse
Course Description Video :
yt.openinapp.co/dmjvd
Introduction to kafka : kzread.info/dash/bejne/pKBpstCdd6TXZ9Y.html
Kafka implementation with producer and consumer :
kzread.info/dash/bejne/iYOEsqlupNynoMo.html
Topic - A bucket of messages (or events in case of kafka) where services may place or read messages from. Messages are organized and durably stored in topics. A topic is similar to a folder, and these messages are the files in that folder. Topics are multi-producer and multi-subscriber. Messages can be read as many times as needed, unlike traditional messaging systems, msgs / events in kafka are not deleted after consumption. Instead, you can define for how long Kafka should retain those events/msgs.
Kafka topics are divided into a number of partitions, which contain msgs/events in an unchangeable sequence. Each msg in a partition is assigned and identified by its unique offset. A topic can also have multiple partition. This allows multiple consumers to read from a topic in parallel.
In Kafka, replication is implemented at the partition level. The redundant unit of a partition is called a replica. Each partition usually has one or more replicas over a few Kafka brokers in the cluster.
Every partition (replica) has one server acting as a leader and the rest of them as followers. The leader replica handles all read-write requests for the specific partition and the followers replicate the leader. If the lead server fails, one of the follower servers becomes the leader by default.
When a producer publishes a msg to a topic, it is published to its leader. The leader appends the msg to its offset and increments its msg offset.
Summary
Kafka has a sized component called a cluster.
Inside a cluster, we’ve got several servers, also known as brokers (usually at least three brokers to provide enough redundancy.)
when a message gets sent to a broker, it gets sent to a particular topic.Topics allow us to categorize data. The data can eventually get broken into several partitions.
By splitting the topic into multiple partitions, we’re facilitating scalability, as each partition can be read by a separate consumer.
Each broker is responsible for receiving messages from producers and committing those messages to disk. The broker is also responsible for answering consumers’ fetch requests and serving them.
While designing a Kafka system, it’s always a wise decision to factor in topic replication. As a result, its topics’ replicas from another broker can solve the crisis, if a broker goes down. Broker1 has Topic 1 and 10 partitions , its replica is in Broker2, so on and so forth. It has got a replication factor of 2; it means it will have one additional copy other than the primary one. It is not possible to have the number of replication factor more than the number of available brokers.
Moreover, exactly one consumer instance reads the data from one partition in one consumer group, at the time of reading.
Since, there is more than one consumer group, in that case, one instance from each of these groups can read from one single partition.
However, there will be some inactive consumers, if the number of consumers exceeds the number of partitions. Let’s understand it with an example if there are 8 consumers and 6 partitions in a single consumer group, that means there will be 2 inactive consumers.
Kafka Cluster: A Kafka cluster is a system that comprises of different brokers, topics, and their respective partitions.
Most Asked Core Java Interview Questions and Answers : kzread.info/head/PLyHJZXNdCXscoyL5XEZoHHZ86_6h3GWE1
Advance Java Interview Questions and Answers : kzread.info/head/PLyHJZXNdCXsexOO1VQ4vs-BM2-8CKrixd
Java 8 Interview Questions and Answers : kzread.info/head/PLyHJZXNdCXsdeusn4OM33415DCMQ6sUKy
Hibernate Interview Questions and Answers : kzread.info/head/PLyHJZXNdCXsdC-p2186C6NO4FpadnCC_q
Spring Boot Interview Questions and Answers : kzread.info/head/PLyHJZXNdCXsexOO1VQ4vs-BM2-8CKrixd
Angular Playlist : kzread.info/dash/bejne/dXWgmbSKg8fXYrQ.html
SQL Playlist : kzread.info/head/PLyHJZXNdCXse86eLuwy5uZohd_bddE9Ni
GIT : kzread.info/head/PLyHJZXNdCXscpl6pxOnL2lRWJlzvzjyZE
Subscriber and Follow Code Decode
Subscriber Code Decode : kzread.info
LinkedIn : www.linkedin.com/in/codedecodeyoutube/
Instagram : codedecode25
#kafka #codedecode #kakfainterviewquestions

Пікірлер: 126

  • @sudhiradlakha5988
    @sudhiradlakha5988 Жыл бұрын

    You are doing a Spectacular job by providing these video tutorials. I wish you may achieve greater heights. May God bless you always!! Looking forward to more practical sessions on Kafka series, Kafka Stream APIs and so on.

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks a lot Sudhir 👍👍

  • @abcdefg143ful
    @abcdefg143ful Жыл бұрын

    I just love the way you teach, very well explained, a series of great tutorials. Thanks a lot.

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    🙂🙂Thanks a lot

  • @saigirindra9846
    @saigirindra98469 ай бұрын

    I really like the way you teach keeping it simple but effective. Keep up the good work and continue doing the same. I would like to ask you to add a playlist with interview questions for Microservices. It will greatly benefit large number of people

  • @AshishYadav-se4db
    @AshishYadav-se4db Жыл бұрын

    Its a great learning again with code Decode, Thank you so much for your effort🙏

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks Ashish 🙂👍

  • @user-gb1cy4yw3p
    @user-gb1cy4yw3p3 ай бұрын

    I have an interview for Kafka, Springboot based role. After seeing this video I got the confidence to crack the interview.

  • @rameshnonia243
    @rameshnonia24310 ай бұрын

    Speechless... Superb Explaination for this tough part

  • @CodeDecode

    @CodeDecode

    10 ай бұрын

    Thanks ramesh

  • @johnnybreathe
    @johnnybreathe Жыл бұрын

    Yes interview questions 🧑‍💻 and some water lol just kidding. This a big topic to go through wow. Thanks for the big effort 🤗 and the videos.

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    😂😂thanks 🙂

  • @johnypremkumar3533
    @johnypremkumar3533 Жыл бұрын

    Please cover micro services design patterns completely.. humble request from loyal fans😀

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    sure we will create it soon

  • @johnypremkumar3533
    @johnypremkumar3533 Жыл бұрын

    way of explanation is short and simple...voice is unique and cool... I want to thank you so so much.... But please cover full cover java, Springboot,spring core,full length videos like 2 hour or 3 hour deeply, one of the underrated channel

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks 🙂🙂sure 👍

  • @dipaliyadav-koli1060
    @dipaliyadav-koli1060 Жыл бұрын

    Best explanation as always .. 👌👌👌 Thanks a lot for creating such a great video. It’s very informative… 🙌

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks Dipali 🙂🙂

  • @RAJANKUMAR52
    @RAJANKUMAR52 Жыл бұрын

    thank you so much for this wonderful video

  • @aditisingh6330
    @aditisingh6330Ай бұрын

    Thanks for all your efforts. Please create video on kafka just for interview purpose, it's a much needed one .

  • @purnendushekharpatra8228
    @purnendushekharpatra8228 Жыл бұрын

    Hi.... Its was a great learning with code Docode, Thank you so much for your effort

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks Purnendu🙂🙂👍👍

  • @soulfulGirl_
    @soulfulGirl_ Жыл бұрын

    Your teaching is too good please cover more on Kafka, spring boot , microservices interview related senario based questions for experienced it's a humble request 😊 , keep up the good job I am totally enjoying your video's 😊

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks Harshini 🙂. Sure 👍👍

  • @novagoyal1576
    @novagoyal1576 Жыл бұрын

    Thanks very well explained. You are doing a great job 👍

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks Nova ❤️❤️

  • @akashranjan878
    @akashranjan87811 күн бұрын

    Thanks for explaining very nicely..

  • @kukkalasasisrinivas9252
    @kukkalasasisrinivas925216 күн бұрын

    Simple and effective 👌 explanation

  • @CodeDecode

    @CodeDecode

    16 күн бұрын

    Thanks 😊👍

  • @rakeshpramanik
    @rakeshpramanik Жыл бұрын

    Nice one .. Can you please make next video of Kafka current Challenges like if Cosumer throws exception how it can restart from particular offset where it lefts or skip it ..configuration changes reqd

  • @sandeepradhakrishna
    @sandeepradhakrishna Жыл бұрын

    A very good tutorial , thanks a lot for the clear explanation

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks Sandeep 🙂👍

  • @tejeswarpala2841
    @tejeswarpala2841 Жыл бұрын

    thanks for the detailed explanation. but i have few doubts coming like what if i have 2 brokers but replication factor is 3. then 1 partition will be on 1 broker and other 2 partitions will be on another broker ? Please cover these combinations in next video on kafka from interview perspective.

  • @KaranSingh-ru4dl
    @KaranSingh-ru4dl Жыл бұрын

    Hi Ma'am, please make video on the implementation of Active MQ and Rabbit MQ also. Thanks for these videos and please continue adding videos in this microservices series. :)

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Sure Karan 🙂👍

  • @amitjain5273
    @amitjain52737 ай бұрын

    Please create a separate video for Kafka Interview Questions. Thank you in advance. Your videos are helping a lot in cracking the interview

  • @CodeDecode

    @CodeDecode

    7 ай бұрын

    sure we are planning for it and we will upload it soon

  • @tanveersyed1049
    @tanveersyed1049 Жыл бұрын

    Nice explanation ....thanks for uploading

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks Tanveer

  • @rajaramiskala
    @rajaramiskala Жыл бұрын

    Thank you for Uploaded Videos , I have Subscribed your channel recently going though all topics really helpful and appreciate your effort. Need video on ( Microservices Design Patterns, Testing Debugging Micro Services, Event Driven approach, Monitor microservices , Deploy, Integration part, MS communication with same & Different databases , ACID properties achieve with MS)

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Awesome topics Iskala 🙂👍sure

  • @amitbhagat4373
    @amitbhagat43735 ай бұрын

    Please make videos on confluent kafka too !!Thanks😊 How to publish messages from springboot application to control centre starting with avro schema.

  • @devalparekh7759
    @devalparekh7759 Жыл бұрын

    Very well explained, it would be helpful if you can create video only for interview perspective. Thanks in advance.

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Sure Deval. It's in pipeline👍🙂

  • @mrengineertrader
    @mrengineertrader Жыл бұрын

    Thanku mam for this imformative vedio.. If possible please create the Kafka stream vedio too.. Keep up the good work..

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks Sandeep 🙂🙂

  • @cheequsharma7391
    @cheequsharma7391 Жыл бұрын

    Great work. Thanks a lot

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    you're welcome

  • @sharmarahul17
    @sharmarahul17 Жыл бұрын

    Thanks you for the video.👌 Please cover interview questions as well.

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Sure Rahul 👍

  • @akashchoudhary5895
    @akashchoudhary5895 Жыл бұрын

    yes please explain kafka streams , kafka connect confluent kafka, its memory managemnt,

  • @rakeshpal8730
    @rakeshpal8730 Жыл бұрын

    Thanks for your effort for explaining the things so easily and efficiently. Need your help regarding a task which was assigned to me. The task is as follows, 1. I have to read the data from DB and push it to kafka. 2. The DB table is updated after 24 hours with new record. 3. In the next iteration only the new records should be pushed to kafka. As the example you have explained was with a string but I have to pass objects to kafka, please help me with this.

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Make sure object is serializable. Rest won't be impacted much. Make a scheduler that reads data from db. Make a boolean variable named as read and mark all records true which are picked by scheduler and next time pick only unread ones. Design must be around this

  • @mrengineertrader

    @mrengineertrader

    Жыл бұрын

    Pass ur JSON object who will be a class in value of kafka template and in application.yml in value deserializer pass a jsonserializer except string serializer

  • @sona7806
    @sona7806 Жыл бұрын

    Thanks for your efforts. Please create Kafka video for interview purpose and kafka streams tutorial.

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Sure Sona 👍

  • @akashsaha9366
    @akashsaha9366 Жыл бұрын

    Excellent explanation maam😄

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks akash 🙂👍

  • @diliprao88
    @diliprao88 Жыл бұрын

    Thanks for creating detailed videos, Please create on Kafka stream api.

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Yes Dilip it's in pipeline🙂👍

  • @dilipkg8229
    @dilipkg8229 Жыл бұрын

    please create a video on Kafka Streams. Thanks for all the wonderful videos

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Sure we will create it soon

  • @shubhamtopare9720
    @shubhamtopare9720 Жыл бұрын

    Thanks for the video.

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    You're welcome shubham

  • @ankitambekar6073
    @ankitambekar6073 Жыл бұрын

    Hi, Thanks for the video, kindly make a video on kafka streams and kafka inteview questions

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Sure Ankit 👍👍

  • @mariusmircea5153
    @mariusmircea515310 ай бұрын

    Around 13:50 you mention something about a book/pdf. Where can I get a link to it? Also, thanks a lot for this series of videos. Really useful :)

  • @UmmakaJagadish
    @UmmakaJagadish Жыл бұрын

    tq madam please do as many as possible sessions in a week

  • @UmmakaJagadish

    @UmmakaJagadish

    Жыл бұрын

    please do one real time project

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Sure Jagadish👍🙂

  • @classicwithregular8710
    @classicwithregular8710 Жыл бұрын

    Mam can you please make a video on How To Deal With The Sum Of Rounded Percentage Not Being 100

  • @surpriser2292
    @surpriser22925 ай бұрын

    Can you please post the Kafka streams video.thank you.

  • @user-cu5pf4yo8c
    @user-cu5pf4yo8c6 ай бұрын

    great effort Madam thank you so much

  • @CodeDecode

    @CodeDecode

    6 ай бұрын

    you're welcome

  • @padmalankipalli593
    @padmalankipalli593 Жыл бұрын

    Pls explain on kafka streams also. I am waiting for ur reach learning video. Thankq team

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Sure Thanks Padma 🙂👍

  • @unemployedcse3514
    @unemployedcse351410 ай бұрын

    Awesome 😍

  • @CodeDecode

    @CodeDecode

    10 ай бұрын

    Thanks 🙂🙂👍

  • @phanimc11211
    @phanimc11211 Жыл бұрын

    Very well explained

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks

  • @lovebranch-hemavasanth
    @lovebranch-hemavasanth Жыл бұрын

    please continue with the series

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Sure 👍🙂

  • @oldaccount137
    @oldaccount137 Жыл бұрын

    Please make separate video about kafka Listener internal working and consumer Lag in spring boot application and advance kafka configurations

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Sure 👍🙂

  • @user-dy9se4xi6b
    @user-dy9se4xi6b11 ай бұрын

    You are explanation is good i would like to see kafka streams lecture can you please make it

  • @CodeDecode

    @CodeDecode

    10 ай бұрын

    Sure 😊👍👍

  • @NirmalSilwal
    @NirmalSilwal Жыл бұрын

    great explanation

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks Nirmal

  • @aditisingh6330
    @aditisingh63303 ай бұрын

    can you please share the pdf or book you are talking about in video, regarding how consumer consumes message from broker?

  • @sourabhjinde8191
    @sourabhjinde8191 Жыл бұрын

    Thank you.Please make video regarding kafka streams

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    sure we will create it soon

  • @rudrapandya4294
    @rudrapandya4294 Жыл бұрын

    Please make video on Kafka streams and Kafka connect

  • @start1learn-n171
    @start1learn-n1714 ай бұрын

    Tq

  • @cnivasrao4720
    @cnivasrao4720 Жыл бұрын

    Kafka Streams Please, and Interview Questins Please

  • @prateetisingha6729
    @prateetisingha6729 Жыл бұрын

    HI can you please explain Aggregator design pattern.

  • @kamalch8928
    @kamalch89283 ай бұрын

    Mam... please make a video on Kafka streams as well.

  • @CodeDecode

    @CodeDecode

    3 ай бұрын

    sure we will create it soon

  • @RockMB
    @RockMB Жыл бұрын

    Mam please create a video with kalfka stream and also for kalfka interview questions. Thanks in advanced 🙂

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Sure mayur we will create it soon

  • @RaghuMahajan
    @RaghuMahajan Жыл бұрын

    You are god!

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    I have no words Raghu. So happy to have this much love from community. But yeah, m far from being god🙏🙏 just a teacher❤. Glad to have you❤❤

  • @sayanbiswas8847
    @sayanbiswas8847 Жыл бұрын

    Please add it in the playlist for microservices.

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Done. And added to new kafka specific playlist too. Thanks Sayan 👍🙂

  • @sayanbiswas8847

    @sayanbiswas8847

    Жыл бұрын

    @@CodeDecode Your channel is a gold mine for cracking interviews. Keep up the good work.

  • @maheshk5376
    @maheshk5376 Жыл бұрын

    Hi ,please cover the interview question on Kafka.

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Sure Mahesh 👍👍

  • @consistentlearners
    @consistentlearners Жыл бұрын

    can you please make the interview questions video for Kafka, this will be really helpful for candidates preparing for interview.

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Sure we will plan it👍👍

  • @divyareddy8747

    @divyareddy8747

    Жыл бұрын

    Can ypu please share the pdf for detail kafka thing or video

  • @hithasundaran91
    @hithasundaran91 Жыл бұрын

    Please do a video on kstream

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Sure 👍👍

  • @UnBoxingDilSe
    @UnBoxingDilSe Жыл бұрын

    can same message be consumed by two subscriber?

  • @akware977
    @akware977 Жыл бұрын

    Hi, Thanks for the video, is partitions behaving like hashMap? also hash collision condition? Also please continue Kafka series, waiting for Kafka streams.

  • @surpriser2292

    @surpriser2292

    5 ай бұрын

    Producers are aware of which partition they have to write data to. This knowledge is known when the data is sent. The key and data will be serialized and converted into bytes. After the bytes conversion we run a algorithm called murmur2 on the key(generated byte code from serializer) which decides the partition number that we have to write to. If collision occurs that means that the key is given same for two different sets of data, that mean the serialization of key would result in same bytes and murmur2 would spit the same partition. You will end up with wrong data for same key.

  • @apv2023
    @apv2023 Жыл бұрын

    please share the links of slides as well :)

  • @user-su4ju3zj6n
    @user-su4ju3zj6n Жыл бұрын

    could you please share the ppt that you are using for presentations to my gmail, I'm preparing for interviews, it will helpful to me go through slides instantly whenever I want

  • @randomguy4822
    @randomguy482215 күн бұрын

    Mam , where can we get this pdf ?

  • @elasingh3151
    @elasingh31515 ай бұрын

    Can you please share pdf mentioned at 13:52 ?

  • @shashikala5900
    @shashikala5900Ай бұрын

    how can i get code decode pdfs

  • @rajig5534
    @rajig5534 Жыл бұрын

    Kafka streams please

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Sure 👍👍

  • @sreeramsarath5188
    @sreeramsarath5188 Жыл бұрын

    How can I can contact i need support for kafka

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Please contact us at codedecodebusiness@gmail.com

  • @saurabhjain4306
    @saurabhjain4306 Жыл бұрын

    Hi ,please cover the interview question on Kafka.

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    sure saurabh we will create it soon

  • @harshitc6775
    @harshitc67756 ай бұрын

    Can you please share pdf mentioned at 13:52 ?