Kafka Reliability Testing
Reliability testing in Kafka involves three key layers:
- Configuration validation
- Application validation
- Production monitoring
Configuration Testing Tools
- VerifiableProducer: Produces numbered sequence messages
- VerifiableConsumer: Validates message sequence and reports gaps
- Trogdor: Kafka's fault injection framework
Key Test Scenarios
-
Leader Elections
- Kill leader broker
- Measure recovery time
- Verify no message loss
-
Broker Failures
- Rolling restarts
- Disk failures
- Network partitions
-
Client Resilience
- Network latency
- Broker unavailability
- Rebalance handling
References
Flashcards
What are the three layers of Kafka reliability testing?:: Configuration validation, application validation, and production monitoring
What tools does Kafka provide for reliability testing?:: VerifiableProducer, VerifiableConsumer, and Trogdor fault injection framework
What happens when a broker loses its ZooKeeper connection?:: Its ephemeral node is automatically removed but broker ID remains in other data structures