When an entire data center can disappear, a single-site Kafka cluster fails with it. A stretched cluster distributes Kafka brokers across separate data centers so one site can fail while the cluster continues operating, provided multiple data centers do not fail simultaneously. section 16.1.4
Figure 16.2 In a stretched cluster, our Kafka brokers are distributed among multiple data centers.
Use the topology diagram to see how brokers are distributed across multiple data centers rather than concentrated on one machine or site. section 16.1.4
Evaluate the pattern against these operational considerations:
- Distribute the cluster across at least three data centers. With only two, the coordination cluster—ZooKeeper- or KRaft-based—can place its majority in the site that fails. section 16.1.4
- Expect substantially greater complexity and cost than operating a local cluster; confirm that protecting against a full data-center outage is worth that investment. section 16.1.4
- Consider off-site backups and infrastructure recreation when prolonged downtime is acceptable. A stretched cluster is not automatically necessary for every business. section 16.1.4
A data-center outage
A Kafka cluster with brokers spread across three data centers can remain operational after one data center fails. The same cluster concentrated in one data center fails completely when that site goes down. section 16.1.4
Stretched clusters reduce the likelihood of total failure by turning a data-center outage into a failure of part of the cluster. They are one option within a broader disaster-management strategy that also includes mirrored clusters and active-active designs. section 16.4
