10.8.3 – Fault Tolerance
Module: Section 10 – Kafka Ecosystem & Tools
Section: 10.8 – ksqlDB in Production
Goal: Understand ksqlDB fault tolerance mechanisms
State Replication
Automatic via changelog topics:
Server 1 (active): Processes partition 0 → Writes to state store
→ Writes to changelog topic
Server 2 (standby): Reads changelog topic → Replicates state store
If Server 1 crashes: Server 2 takes over partition 0 (state already replicated)
Recovery Time
Factors:
- State store size
- Changelog topic lag
- Disk I/O speed
Typical: 30-120 seconds for 1 GB state store
Rebalancing
Triggers:
- Server added/removed
- Server crash
- Network partition
Impact: Temporary query pause during rebalancing
Key Takeaways
- Changelog Topics: Automatic state replication
- Standby Replicas: Ready to take over
- Recovery: 30-120s typical
- Rebalancing: Temporary pause
What's Next?
Next Module: 10.8.4 – Operational Best Practices