Integration / Apache Kafka Interview questions
Define replication in Kafka?
Replication means each partition's data is copied to multiple brokers, not just stored on one, so the cluster can survive a broker failure without losing data or availability. The number of copies is set per topic via the replication factor — a replication factor of 3 means every partition has one leader replica and two follower replicas, each living on a different broker.
kafka-topics.sh --create --topic orders --partitions 3 --replication-factor 3 --bootstrap-server localhost:9092
Followers continuously fetch new records from their partition's leader to stay caught up; a follower that's fully caught up is considered part of the in-sync replica (ISR) set. If the broker hosting the leader fails, Kafka can promote one of the in-sync followers to be the new leader, so the partition keeps serving reads and writes with no data loss, as long as at least one in-sync replica survived the failure.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
