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

  Рет қаралды 48,020

Code Decode

Code Decode

2 жыл бұрын

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 : • Kafka tutorial for Beg...
Kafka implementation with producer and consumer :
• Kafka Implementation w...
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 : • Core Java frequently a...
Advance Java Interview Questions and Answers : • Advance Java Interview...
Java 8 Interview Questions and Answers : • Java 8 Interview Quest...
Hibernate Interview Questions and Answers : • Hibernate Interview Qu...
Spring Boot Interview Questions and Answers : • Advance Java Interview...
Angular Playlist : • Angular Course Introdu...
SQL Playlist : • SQL Interview Question...
GIT : • GIT
Subscriber and Follow Code Decode
Subscriber Code Decode : kzfaq.info?...
LinkedIn : / 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
@rameshnonia243
@rameshnonia243 10 ай бұрын
Speechless... Superb Explaination for this tough part
@CodeDecode
@CodeDecode 10 ай бұрын
Thanks ramesh
@AshishYadav-se4db
@AshishYadav-se4db 2 жыл бұрын
Its a great learning again with code Decode, Thank you so much for your effort🙏
@CodeDecode
@CodeDecode Жыл бұрын
Thanks Ashish 🙂👍
@saigirindra9846
@saigirindra9846 9 ай бұрын
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
@RAJANKUMAR52
@RAJANKUMAR52 Жыл бұрын
thank you so much for this wonderful video
@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 🙂🙂
@purnendushekharpatra8228
@purnendushekharpatra8228 2 жыл бұрын
Hi.... Its was a great learning with code Docode, Thank you so much for your effort
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Purnendu🙂🙂👍👍
@novagoyal1576
@novagoyal1576 Жыл бұрын
Thanks very well explained. You are doing a great job 👍
@CodeDecode
@CodeDecode Жыл бұрын
Thanks Nova ❤️❤️
@johnnybreathe
@johnnybreathe 2 жыл бұрын
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 2 жыл бұрын
😂😂thanks 🙂
@johnypremkumar3533
@johnypremkumar3533 2 жыл бұрын
Please cover micro services design patterns completely.. humble request from loyal fans😀
@CodeDecode
@CodeDecode 2 жыл бұрын
sure we will create it soon
@kukkalasasisrinivas9252
@kukkalasasisrinivas9252 24 күн бұрын
Simple and effective 👌 explanation
@CodeDecode
@CodeDecode 24 күн бұрын
Thanks 😊👍
@sandeepradhakrishna
@sandeepradhakrishna Жыл бұрын
A very good tutorial , thanks a lot for the clear explanation
@CodeDecode
@CodeDecode Жыл бұрын
Thanks Sandeep 🙂👍
@tanveersyed1049
@tanveersyed1049 2 жыл бұрын
Nice explanation ....thanks for uploading
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Tanveer
@akashranjan878
@akashranjan878 20 күн бұрын
Thanks for explaining very nicely..
@johnypremkumar3533
@johnypremkumar3533 2 жыл бұрын
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 2 жыл бұрын
Thanks 🙂🙂sure 👍
@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 👍👍
@user-gb1cy4yw3p
@user-gb1cy4yw3p 3 ай бұрын
I have an interview for Kafka, Springboot based role. After seeing this video I got the confidence to crack the interview.
@aditisingh6330
@aditisingh6330 2 ай бұрын
Thanks for all your efforts. Please create video on kafka just for interview purpose, it's a much needed one .
@cheequsharma7391
@cheequsharma7391 Жыл бұрын
Great work. Thanks a lot
@CodeDecode
@CodeDecode Жыл бұрын
you're welcome
@shubhamtopare9720
@shubhamtopare9720 Жыл бұрын
Thanks for the video.
@CodeDecode
@CodeDecode Жыл бұрын
You're welcome shubham
@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.
@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
@akashsaha9366
@akashsaha9366 Жыл бұрын
Excellent explanation maam😄
@CodeDecode
@CodeDecode Жыл бұрын
Thanks akash 🙂👍
@phanimc11211
@phanimc11211 Жыл бұрын
Very well explained
@CodeDecode
@CodeDecode Жыл бұрын
Thanks
@NirmalSilwal
@NirmalSilwal Жыл бұрын
great explanation
@CodeDecode
@CodeDecode Жыл бұрын
Thanks Nirmal
@unemployedcse3514
@unemployedcse3514 11 ай бұрын
Awesome 😍
@CodeDecode
@CodeDecode 11 ай бұрын
Thanks 🙂🙂👍
@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 🙂👍
@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
@user-cu5pf4yo8c
@user-cu5pf4yo8c 6 ай бұрын
great effort Madam thank you so much
@CodeDecode
@CodeDecode 6 ай бұрын
you're welcome
@sharmarahul17
@sharmarahul17 Жыл бұрын
Thanks you for the video.👌 Please cover interview questions as well.
@CodeDecode
@CodeDecode Жыл бұрын
Sure Rahul 👍
@amitjain5273
@amitjain5273 7 ай бұрын
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
@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 🙂🙂
@diliprao88
@diliprao88 Жыл бұрын
Thanks for creating detailed videos, Please create on Kafka stream api.
@CodeDecode
@CodeDecode Жыл бұрын
Yes Dilip it's in pipeline🙂👍
@lovebranch-hemavasanth
@lovebranch-hemavasanth Жыл бұрын
please continue with the series
@CodeDecode
@CodeDecode Жыл бұрын
Sure 👍🙂
@UmmakaJagadish
@UmmakaJagadish 2 жыл бұрын
tq madam please do as many as possible sessions in a week
@UmmakaJagadish
@UmmakaJagadish 2 жыл бұрын
please do one real time project
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure Jagadish👍🙂
@sona7806
@sona7806 Жыл бұрын
Thanks for your efforts. Please create Kafka video for interview purpose and kafka streams tutorial.
@CodeDecode
@CodeDecode Жыл бұрын
Sure Sona 👍
@ankitambekar6073
@ankitambekar6073 Жыл бұрын
Hi, Thanks for the video, kindly make a video on kafka streams and kafka inteview questions
@CodeDecode
@CodeDecode Жыл бұрын
Sure Ankit 👍👍
@akashchoudhary5895
@akashchoudhary5895 Жыл бұрын
yes please explain kafka streams , kafka connect confluent kafka, its memory managemnt,
@dilipkg8229
@dilipkg8229 Жыл бұрын
please create a video on Kafka Streams. Thanks for all the wonderful videos
@CodeDecode
@CodeDecode Жыл бұрын
Sure we will create it soon
@sourabhjinde8191
@sourabhjinde8191 Жыл бұрын
Thank you.Please make video regarding kafka streams
@CodeDecode
@CodeDecode Жыл бұрын
sure we will create it soon
@mariusmircea5153
@mariusmircea5153 10 ай бұрын
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 :)
@rakeshpal8730
@rakeshpal8730 2 жыл бұрын
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 2 жыл бұрын
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
@start1learn-n171
@start1learn-n171 4 ай бұрын
Tq
@surpriser2292
@surpriser2292 5 ай бұрын
Can you please post the Kafka streams video.thank you.
@classicwithregular8710
@classicwithregular8710 2 жыл бұрын
Mam can you please make a video on How To Deal With The Sum Of Rounded Percentage Not Being 100
@padmalankipalli593
@padmalankipalli593 Жыл бұрын
Pls explain on kafka streams also. I am waiting for ur reach learning video. Thankq team
@CodeDecode
@CodeDecode Жыл бұрын
Sure Thanks Padma 🙂👍
@rudrapandya4294
@rudrapandya4294 Жыл бұрын
Please make video on Kafka streams and Kafka connect
@user-dy9se4xi6b
@user-dy9se4xi6b Жыл бұрын
You are explanation is good i would like to see kafka streams lecture can you please make it
@CodeDecode
@CodeDecode 11 ай бұрын
Sure 😊👍👍
@kamalch8928
@kamalch8928 3 ай бұрын
Mam... please make a video on Kafka streams as well.
@CodeDecode
@CodeDecode 3 ай бұрын
sure we will create it soon
@amitbhagat4373
@amitbhagat4373 6 ай бұрын
Please make videos on confluent kafka too !!Thanks😊 How to publish messages from springboot application to control centre starting with avro schema.
@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❤❤
@aditisingh6330
@aditisingh6330 3 ай бұрын
can you please share the pdf or book you are talking about in video, regarding how consumer consumes message from broker?
@prateetisingha6729
@prateetisingha6729 Жыл бұрын
HI can you please explain Aggregator design pattern.
@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 👍🙂
@cnivasrao4720
@cnivasrao4720 Жыл бұрын
Kafka Streams Please, and Interview Questins Please
@UnBoxingDilSe
@UnBoxingDilSe Жыл бұрын
can same message be consumed by two subscriber?
@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
@sayanbiswas8847
@sayanbiswas8847 2 жыл бұрын
Please add it in the playlist for microservices.
@CodeDecode
@CodeDecode 2 жыл бұрын
Done. And added to new kafka specific playlist too. Thanks Sayan 👍🙂
@sayanbiswas8847
@sayanbiswas8847 2 жыл бұрын
@@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 👍👍
@apv2023
@apv2023 Жыл бұрын
please share the links of slides as well :)
@hithasundaran91
@hithasundaran91 Жыл бұрын
Please do a video on kstream
@CodeDecode
@CodeDecode Жыл бұрын
Sure 👍👍
@shashikala5900
@shashikala5900 Ай бұрын
how can i get code decode pdfs
@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
@randomguy4822
@randomguy4822 24 күн бұрын
Mam , where can we get this pdf ?
@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
@harshitc6775
@harshitc6775 7 ай бұрын
Can you please share pdf mentioned at 13:52 ?
@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.
@sreeramsarath5188
@sreeramsarath5188 Жыл бұрын
How can I can contact i need support for kafka
@CodeDecode
@CodeDecode Жыл бұрын
Please contact us at codedecodebusiness@gmail.com
@rajig5534
@rajig5534 Жыл бұрын
Kafka streams please
@CodeDecode
@CodeDecode Жыл бұрын
Sure 👍👍
@saurabhjain4306
@saurabhjain4306 Жыл бұрын
Hi ,please cover the interview question on Kafka.
@CodeDecode
@CodeDecode Жыл бұрын
sure saurabh we will create it soon
@elasingh3151
@elasingh3151 6 ай бұрын
Can you please share pdf mentioned at 13:52 ?
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 13 МЛН
- А что в креме? - Это кАкАооо! #КондитерДети
00:24
Телеканал ПЯТНИЦА
Рет қаралды 8 МЛН
EVOLUTION OF ICE CREAM 😱 #shorts
00:11
Savage Vlogs
Рет қаралды 7 МЛН
System Design: Why is Kafka fast?
5:02
ByteByteGo
Рет қаралды 1 МЛН
Apache Kafka Crash Course | What is Kafka?
1:17:04
Piyush Garg
Рет қаралды 437 М.
Apache Kafka Architecture
11:19
Anton Putra
Рет қаралды 19 М.
Kafka in 100 Seconds
2:35
Fireship
Рет қаралды 854 М.
🚀 Apache Kafka Crash Course With Spring Boot 3.0.x | @Javatechie
4:50:16
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 13 МЛН