Kafka

30 questions

Kafka architecture, exactly-once semantics, schema evolution, production troubleshooting, and event-driven design patterns.

1JuniorCore ConceptsAmazonUberFlipkart

Kafka Architecture Overview

Explain Kafka's core architecture: brokers, topics, partitions, producers, consumers, and consumer groups. Draw the relationship.

🔒
2JuniorCore ConceptsAmazonUber

Partitions and Ordering

How does Kafka guarantee message ordering? If I produce messages A, B, C with the same key, will consumers always see them in that order?

🔒
3SeniorCore ConceptsAmazonUberFlipkart

Consumer Groups and Rebalancing

What happens during a consumer group rebalance? Why is it problematic? How do you minimize rebalance impact?

🔒
4SeniorCore ConceptsAmazonJPMC

Offsets and Commit Strategies

Explain Kafka consumer offsets. What's the difference between auto-commit and manual commit? When does each cause problems?

🔒
5SeniorCore ConceptsAmazonUber

Replication and ISR

Explain Kafka replication. What's the ISR (In-Sync Replicas)? What happens when a broker goes down? What's unclean leader election?

🔒
6SeniorCore ConceptsAmazonUber

Producer Internals

Walk through what happens internally when a Kafka producer sends a message. Include batching, compression, partitioning, and acknowledgment.

🔒
🔒 24 more premium questions
Upgrade to PRO — ₹1,499/month
7SeniorCore ConceptsAmazonDatabricks🔒 Premium

Log Compaction

What is log compaction in Kafka? How is it different from time-based retention? When would you use it?

🧠 What they're really testing
🔒
8JuniorCore ConceptsAmazonFlipkart🔒 Premium

Kafka vs Other Message Systems

When would you choose Kafka vs RabbitMQ vs SQS vs Kinesis? What makes Kafka different?

🧠 What they're really testing
🔒
9SeniorCore ConceptsAmazonUber🔒 Premium

Choosing Partition Count

Your team is creating a new Kafka topic for order events. How do you choose the number of partitions? The system handles 50K orders/second at peak.

🧠 What they're really testing
🔒
10SeniorCore ConceptsTroubleshootingAmazonUber🔒 Premium

Consumer Lag Monitoring

What is consumer lag? How do you monitor it? Your consumer lag is growing — walk through your debugging process.

🧠 What they're really testing
🔒
11SeniorArchitectureAmazonDatabricks🔒 Premium

KRaft vs ZooKeeper

What is KRaft mode? Why is Kafka removing ZooKeeper? What changes for operators?

🧠 What they're really testing
🔒
12LeadExactly-OnceAmazonUberJPMC🔒 Premium

Exactly-Once Semantics

Explain Kafka's exactly-once semantics end-to-end. What are the three levels of guarantee? How do transactions work?

🧠 What they're really testing
🔒
13SeniorExactly-OnceAmazonUber🔒 Premium

Idempotent Producer Deep Dive

How does the idempotent producer work internally? What does it prevent? What doesn't it prevent?

🧠 What they're really testing
🔒
14SeniorSchema & SerDeAmazonUber🔒 Premium

Schema Registry and Avro

What is Confluent Schema Registry? Why use Avro/Protobuf over JSON? How does schema evolution work?

🧠 What they're really testing
🔒
15LeadSchema & SerDeUberAmazon🔒 Premium

Handling Schema Changes in Production

Your producer team needs to rename a field and change a field type (int → long). Both are breaking changes. How do you handle this without downtime?

🧠 What they're really testing
🔒
16SeniorArchitectureAmazonFlipkart🔒 Premium

Kafka Connect

What is Kafka Connect? When would you use it instead of writing a custom producer/consumer? Show a real-world example.

🧠 What they're really testing
🔒
17LeadArchitectureUberAmazonJPMC🔒 Premium

Event-Driven Architecture with Kafka

Design an event-driven order processing system using Kafka. An order goes through: placed → payment → inventory → shipping → delivered. How do you handle failures at each stage?

🧠 What they're really testing
🔒
18SeniorArchitectureUberAmazon🔒 Premium

Kafka Streams vs Flink vs Spark Streaming

When would you choose Kafka Streams vs Flink vs Spark Structured Streaming? What are the key architectural differences?

🧠 What they're really testing
🔒
19LeadArchitectureUberAmazonJPMC🔒 Premium

Outbox Pattern

Your service needs to update a database AND publish a Kafka event atomically. A crash between the two operations causes inconsistency. How do you solve this?

🧠 What they're really testing
🔒
20LeadTroubleshootingAmazonUberJPMC🔒 Premium

Data Loss Scenarios

List all the ways data can be lost in Kafka. For each, explain the cause and the configuration to prevent it.

🧠 What they're really testing
🔒
21SeniorTroubleshootingAmazonFlipkart🔒 Premium

Message Too Large / Poison Pill

Your consumer keeps crashing on a specific message. It restarts, re-reads the same message, crashes again — infinite loop. How do you handle this 'poison pill' scenario?

🧠 What they're really testing
🔒
22LeadArchitectureAmazonUber🔒 Premium

Kafka Cluster Sizing

You're designing a Kafka cluster for 500K messages/sec, 1KB average message, 7-day retention, replication factor 3. How many brokers, what disk, what memory?

🧠 What they're really testing
🔒
23SeniorTroubleshootingAmazonFlipkart🔒 Premium

Slow Consumer Troubleshooting

Your consumer group processes messages too slowly. Lag is growing by 10K messages/minute. Walk through your investigation and fixes.

🧠 What they're really testing
🔒
24LeadArchitectureUberAmazon🔒 Premium

Cross-DC Replication

Your company needs Kafka data replicated across two data centers for disaster recovery. What are the options? What are the trade-offs?

🧠 What they're really testing
🔒
25SeniorArchitectureJPMCGoldman Sachs🔒 Premium

Kafka Security

How do you secure a Kafka cluster? Cover authentication, authorization, encryption, and audit.

🧠 What they're really testing
🔒
26LeadTroubleshootingArchitectureUberAmazon🔒 Premium

Message Ordering Across Services

You have 3 microservices that produce events to the same Kafka topic: order-created, payment-confirmed, order-shipped. A consumer sometimes receives payment-confirmed before order-created. Why? How do you fix it?

🧠 What they're really testing
🔒
27SeniorTroubleshootingAmazonFlipkart🔒 Premium

Kafka Connect Failures

Your Debezium CDC source connector stops capturing changes from PostgreSQL. The connector shows as RUNNING but no new messages appear. What happened?

🧠 What they're really testing
🔒
28SeniorTroubleshootingUberAmazon🔒 Premium

Backpressure Handling

Your Kafka producer is getting BufferExhaustedException. What's happening and how do you handle backpressure?

🧠 What they're really testing
🔒
29LeadArchitectureJPMCGoldman Sachs🔒 Premium

Kafka for Event Sourcing

Can Kafka be used as an event store for event sourcing? What are the benefits and limitations? When should you use a dedicated event store instead?

🧠 What they're really testing
🔒
30SeniorTroubleshootingArchitectureAmazonFlipkart🔒 Premium

Migrate from Single Topic to Multi-Topic

Your team made all events go to one Kafka topic (events). It now has 500 partitions but consumers are struggling because payment events must be processed separately from analytics events. How do you split it?

🧠 What they're really testing
🔒