This episode prepares the team for incidents: writing runbooks for job failures, responding to checkpoint failures and job crashes, backup configuration and disaster recovery, and chaos testing for streaming resilience.

All the techniques in this series come down to one practical question: when a production job fails in the middle of the night, do you know what to do? Episode 19 answers with runbooks — documented procedures that turn incident response into reflex, not improvisation.
We'll write runbooks for job failures, respond to checkpoint failures and job crashes, prepare backups and disaster recovery, and close with chaos testing to deliberately probe system resilience. The end goal is simple: failures no longer surprise your team.
A runbook is a step-by-step document for handling a specific situation. Every good runbook contains:
./bin/flink list -a
tail -n 100 $FLINK_HOME/log/taskexecutor.log
./bin/flink run -d -s /backups/savepoint-latest target/app.jar./bin/flink list -a shows the job status, tail -n 100 reads the latest logs, and ./bin/flink run -d -s restores from a savepoint. A good runbook writes exact steps like these — complete with the expected output examples.
Store runbooks somewhere accessible from anywhere during an incident. Short formats are better than complete ones: bullet points, commands, and expected outputs. A runbook that's too long simply won't be read when the system is having problems.
A repeatedly failing checkpoint is an early warning. Common causes: storage can't hold the state, state size grows quickly, or checkpoint time exceeds the timeout. The right response:
execution.checkpointing.interval: 5min
execution.checkpointing.min-pause: 2min
execution.checkpointing.tolerable-failed-checkpoints: 3execution.checkpointing.tolerable-failed-checkpoints tolerates several checkpoint failures before the job fails outright — giving you time to handle the cause without panicking.
When a job fails, the restart strategy determines automatic recovery:
restart-strategy.type: exponential-delay
restart-strategy.exponential-delay.initial-backoff: 10s
restart-strategy.exponential-delay.max-backoff: 1min
restart-strategy.exponential-delay.backoff-multiplier: 2.0
restart-strategy.exponential-delay.reset-backoff-threshold: 1hexponential-delay lengthens the pause between restart attempts — preventing downstream systems from being flooded with retries while the problem persists. If the job keeps crashing, don't just restart: find the root cause in the logs first.
Savepoints are artifacts that must be backed up. Send them to object storage separate from the cluster:
./bin/flink savepoint <jobId> s3://flink-backup/savepoints./bin/flink savepoint with an s3:// target stores the savepoint directly to a durable location. Set a policy: create routine savepoints before major upgrades and keep the last few versions.
Disaster recovery isn't just about backups, but a tested recovery sequence:
Without practice, a DR plan is just a document. Test it periodically so the sequence is committed to the team's memory.
Chaos testing deliberately breaks components to test system resilience:
./bin/taskmanager.sh stop
./bin/flink list -a./bin/taskmanager.sh stop forcibly kills one TaskManager. A healthy job will restart its subtasks in the remaining slots and recover from checkpoints — if it doesn't, there's a gap to fix.
Focus on the scenarios with the biggest impact, not the most dramatic ones:
Record the results of each experiment into the runbook: what happened, how long recovery took, and what was fixed. Chaos testing turns theoretical knowledge about fault tolerance into empirical evidence.
Episode 19 closed the operational side: writing runbooks that can be executed during an earthquake, responding calmly to checkpoint failures and job crashes, preparing tested backups and disaster recovery, and validating resilience through chaos testing.
The key takeaways:
In the next episode, episode 20, we'll discuss real-time analytics & use cases — building monitoring and alerting dashboards, implementing fraud detection, real-time recommendation, and IoT processing, and designing an end-to-end streaming pipeline with data enrichment and stream joins. All the theory you've learned will come together in one real architecture.