🎯 Kafka interview questions
📌 Fundamentals
• What problem does Kafka solve?
• Kafka vs synchronous REST communication?
• Broker vs Cluster?
• Topic vs Partition?
📌 Partitions & Ordering
• Why does Kafka use partitions?
• How is a partition selected?
• What is the role of a message key?
• How does Kafka guarantee ordering?
• Can Kafka guarantee ordering across partitions?
📌 Consumers
• What is a consumer group?
• What happens when consumers > partitions?
• What happens when a consumer crashes?
• What is consumer lag?
• How would you troubleshoot increasing consumer lag?
• Where are consumer offsets stored?
📌 Reliability & Storage
• What is replication factor?
• Leader vs Follower vs ISR?
• What happens when a broker goes down?
• How does Kafka provide fault tolerance?
• What are Kafka segments?
• How does Kafka retention work?
📌 Design & Troubleshooting
• How would you design Kafka for high throughput?
• How would you decide the number of partitions?
• How would you preserve ordering for a specific customer/order?
• How would you troubleshoot a slow consumer?
• What happens when a partition leader fails?
• Kafka Connect vs Kafka Streams?
• ZooKeeper vs KRaft?