A standby task shadows an active Kafka Streams task by consuming its changelog topic into a local state store. It does not process records; it keeps state synchronized so reassignment can become active with minimal recovery time. section 7.4.2
Configure and evaluate standby tasks by checking:
- Set num.standby.replicas above 0 and deploy N + 1 Kafka Streams instances for N desired replicas, ideally on separate machines. section 7.4.2
- Expect faster recovery after an instance drops out: the standby is already caught up or only a handful of records behind. section 7.4.2
- Balance near-immediate failover against duplicated state-store data. section 7.4.2
Figure 7.19 A standby task shadows the active task and consumes from the changelog topic, keeping a local state store in sync with the store of the active task.
Trace how a standby consumes the changelog topic and keeps its local state store synchronized with the active task. section 7.4.2
Figure 7.18 When a stateful task gets moved to a new machine, Kafka Streams rebuilds the state store from the beginning of the changelog topic.
Contrast standby failover with rebuilding a newly assigned state store from the beginning of its changelog topic. section 7.4.1
