Apache Kafka Interview Questions
Topics & partitions, brokers & clusters, producers & consumer groups, offsets, replication & ISR, delivery semantics, log compaction, Kafka Connect, Kafka Streams and exactly-once processing.
61 questions
Popular Searches
1. What is Apache Kafka and what problems does it solve?
easyKafka Fundamentals 5 mins2. What is the difference between Kafka and a traditional message queue?
mediumMessaging Concepts 6 mins3. What is a Kafka topic and how does partitioning work?
mediumTopics and Partitions 6 mins4. What is a Kafka partition and why is it the unit of parallelism?
mediumPartitions 6 mins5. What is a Kafka broker and how does a Kafka cluster work?
mediumCluster Architecture 6 mins6. What is a producer in Kafka and how does it choose a partition?
mediumProducers 6 mins7. What is a consumer group in Kafka and how does it enable scaling?
mediumConsumers 6 mins8. What is a Kafka offset and how is consumer position tracked?
mediumOffsets 6 mins9. What is the role of ZooKeeper in Kafka and what is KRaft mode?
hardArchitecture 7 mins10. How does Kafka guarantee message ordering?
mediumPartitions & Ordering 7 mins11. What are the different delivery semantics in Kafka (at-most-once, at-least-once, exactly-once)?
hardDelivery Semantics 8 mins12. How does Kafka achieve durability with replication and the ISR?
hardReplication & Durability 8 mins13. What is the difference between a leader and follower replica in Kafka?
mediumReplication 6 mins14. What is acks configuration in a Kafka producer and what do 0, 1, and all mean?
mediumProducers 6 mins15. How does log compaction work in Kafka?
hardStorage & Retention 7 mins16. What is the difference between Kafka retention by time and by size?
mediumRetention 6 mins17. How does a Kafka consumer commit offsets and what is the risk of auto-commit?
mediumOffsets 7 mins18. What is consumer rebalancing in Kafka and why can it be disruptive?
hardConsumer Groups 8 mins19. What is Kafka Connect and when would you use it?
mediumKafka Connect 6 mins20. What is Kafka Streams and how does it differ from a plain consumer?
mediumStream Processing 7 mins21. What is the difference between Kafka Streams and ksqlDB?
mediumStream Processing 7 mins22. How does Kafka handle backpressure and slow consumers?
hardConsumers & Flow Control 7 mins23. What is idempotent producer in Kafka and how does it prevent duplicates?
mediumProducers & Delivery Guarantees 6 mins24. What is a transactional producer in Kafka?
hardProducers & Delivery Guarantees 7 mins25. How do you scale Kafka throughput?
hardScaling & Performance 7 mins26. What is the difference between Kafka and RabbitMQ?
mediumMessaging Systems 6 mins27. How does Kafka handle message keys and what happens without a key?
mediumPartitioning 6 mins28. What is the purpose of the __consumer_offsets topic in Kafka?
mediumConsumer Offsets 6 mins29. How does replication factor and min.insync.replicas affect availability in Kafka?
hardReplication & Durability 7 mins30. What are common causes of consumer lag in Kafka and how do you address it?
mediumPerformance & Monitoring 6 mins31. What causes Kafka consumer rebalance storms and how do you prevent them?
hardConsumer Operations 9 mins32. Why is Kafka partition count a one-way door, and how do you choose it?
hardTopic Design 9 mins33. How do you implement exactly-once processing in a Kafka read-process-write pipeline?
hardDelivery Guarantees 10 mins34. What causes a hot partition in Kafka and how do you fix it?
hardTopic Design 9 mins35. Why does the ISR shrink in Kafka, and when would you allow unclean leader election?
hardReplication and Availability 10 mins36. How do Schema Registry compatibility modes work, and how do you evolve a Kafka event schema safely?
hardSchema Management 10 mins37. How do you handle a poison message in Kafka and design a dead-letter topic?
hardError Handling 10 mins38. How does Kafka rack awareness work, and how do you survive an availability-zone failure?
hardCluster Architecture 10 mins39. How do you reassign Kafka partitions and add brokers without downtime?
hardCluster Operations 10 mins40. How do you tune a Kafka producer for throughput versus latency?
hardPerformance Tuning 10 mins41. Which Kafka broker metrics do you monitor, and what do you actually alert on?
hardOperations & Monitoring 10 mins42. How do you secure a Kafka cluster with TLS, SASL and ACLs?
hardSecurity 11 mins43. How do you perform a rolling upgrade of a Kafka cluster without downtime?
hardCluster Operations 10 mins44. How do you diagnose and recover a Kafka broker that has run out of disk space?
hardCluster Operations 10 mins45. How do you test Kafka producers, consumers and Streams applications reliably?
mediumTesting 9 mins46. Why does a Kafka producer throw TimeoutException with 'Expiring N record(s)', and how do you debug it?
hardProducer Troubleshooting 10 mins47. How do you operate Kafka Connect when a connector task keeps failing?
hardKafka Connect 10 mins48. How do you replicate Kafka across clusters for disaster recovery, and why are offsets the hard part?
hardMulti-Cluster & DR 11 mins49. Why does Kafka broker performance depend on the OS page cache, and what does that change about tuning?
hardPerformance 10 mins50. How do Kafka quotas work, and how do you isolate tenants on a shared cluster?
hardMulti-Tenancy 10 mins51. How do Kafka Streams state stores recover after a failure, and what do standby replicas change?
hardKafka Streams Operations 11 mins52. How do Kafka record timestamps work, and how do you replay from a point in time?
mediumTime & Replay 10 mins53. How does cooperative incremental rebalancing differ from eager rebalancing in Kafka?
hardConsumer Group Protocol 9 mins54. How does static group membership work in Kafka, and when should you use it?
mediumConsumer Group Protocol 8 mins55. When should you use synchronous versus asynchronous offset commits in Kafka?
mediumOffset Management 9 mins56. Where do Kafka's exactly-once semantics stop, and what must the application still handle?
hardDelivery Guarantees 10 mins57. What is the last stable offset, and how does read_committed isolation work in Kafka?
hardTransactions 10 mins58. How do tombstones and delete.retention.ms work in a compacted Kafka topic?
hardStorage and Retention 10 mins59. How do you repartition a skewed Kafka key space without losing per-key ordering?
hardTopic Design 10 mins60. How do you tell whether Kafka consumer lag is a throughput shortfall or a stall?
mediumTroubleshooting 9 mins61. How do you roll out a breaking Kafka schema change across producers and consumers?
hardSchema Management 10 mins