liveBook · Manning

Stretched cluster

As explained in Apache Kafka in Action

A stretched cluster is a distributed cluster whose nodes are deployed across separate physical locations or failure domains.

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.
A group of buttons with text

AI-generated content may be incorrect.

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

How Apache Kafka in Action covers it

How deep it goes
Explains topology, outage behavior, minimum site count, coordination risk, and cost trade-offs without detailing deployment commands.
Examples
Uses a Kafka topology spanning multiple data centers and contrasts it with a single-site cluster during a site outage.
What you can do after
Evaluate whether multi-data-center Kafka deployment justifies its complexity and cost for data-center outage protection.
How it connects
Connects data center failures with disaster recovery, mirrored clusters, MirrorMaker, and active-active replication.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Apache Kafka in Action. The section links point to the parts of the book it draws on.