skip to content

What should an organisation's standing rule be for how many failure domains a cluster spans, and what does that rule foreclose?

level: principalimportance: should knowfreq 34%

answer

  1. write the rule, then defend its words
  2. independent is the load-bearing word
  3. three is the smallest workable number
  4. name the unit: rack, building, locality
  5. enforce at provisioning, not at review

basics

~20 s

Usually: every cluster spans three independent domains, with neither the copies of a partition nor the membership holding cluster metadata leaving a majority in any one. It forecloses single-rack clusters, two-domain locations without a tie-breaker, and any domain far enough away to sit in the write path.

solid answer

~50 s

The defensible default is three domains, applied to both halves of the cluster: no single domain holds a majority of any partition's copy set, and none holds a majority of the membership that admits structural change. Three is the smallest number where any one loss still leaves a majority, and the third domain may be small enough to hold only a tie-breaking member. The rule also has to fix which boundary counts as a domain — rack, building or region — since that is what decides whether it is satisfied. What it forecloses is real: cheap single-rack clusters stop being allowed, a location offering only two independent domains needs a tie-breaking member elsewhere or an explicit manual intervention, and domains chosen far apart put a round trip into every acknowledged write that must cross them. Enforce it at provisioning; after data exists it is a migration.

go deeper

for a junior

The thing to take away is that organisations fix this once, as a rule for every cluster, instead of deciding it per project — and that the rule is about independent failure, not about counting buildings.

for a middle

Be able to state the rule and justify three as the smallest number that keeps a majority alive after any single loss, and to say that it covers the metadata membership as well as the copies.

for a senior

Show where it is enforced. Provisioning sets the domain label, a node without one does not join, and the per-domain copy view is watched alongside the copy count; anything else records drift after the fact.

for a principal

Own the exceptions and the terms: what counts as independent, which unit the rule names, what it forecloses in machine choice and capacity, and who signs off the clusters that cannot comply.

## The rule is one sentence, and the argument is about its terms A usable estate rule reads roughly: *every production cluster spans at least three independent failure domains, and no single domain holds a majority of any partition's copy set or of the membership holding cluster metadata.* Everything contentious is in the words. - **"Independent"** is the load-bearing word. Three racks on one breaker, or three buildings on one fibre path, are one domain wearing three labels, and no arithmetic downstream can detect that. - **"At least three"** is the smallest number for which any single loss leaves a majority. Two is the trap: an even split leaves neither survivor decisive, and an uneven one is a bet on which domain fails. - **"Or of the membership holding cluster metadata"** is the clause teams drop. A cluster whose data survived a domain loss but whose metadata membership did not survived the failure and cannot react to it. - **"Spans"** needs a unit. The rule must name whether a domain is a rack, a building or a region, because that choice decides both what the cluster survives and what it pays. ## Choosing the unit | Domain unit the rule fixes | Survives | Puts into the write path | |---|---|---| | rack | a power feed, a switch, row maintenance | essentially nothing | | building or zone within one locality | a whole building, its power and its cooling | a short extra hop on writes that must cross | | distant localities, one cluster stretched across them | the loss of an entire locality | a long round trip on every write that must cross | The table is why "spread as widely as possible" is not the answer. Distance between domains is bought with a hop in the acknowledged write path, and how much of that is worth buying is a separate decision from this one. Most estates settle on three domains within one locality as the default and treat anything wider as a different design with its own justification. ## What the rule forecloses A standing rule is worth having only if you can say what it costs, and this one costs: 1. **Cheap single-domain clusters.** The development cluster somebody wanted in one rack is now either an exception with a name and an owner, or it is three domains too. 2. **Locations that only offer two.** Some sites have exactly two independent domains. The rule forces a choice: a tie-breaking member placed somewhere else, an explicit and rehearsed manual intervention when a domain is lost, or not running production there. 3. **Free choice of machine.** The machine type, the storage kind or the accelerator you want may not exist in all three domains. The rule wins, or it is not a rule. 4. **Capacity flexibility.** Each domain has to be able to carry its share of the work when another is gone, which is a standing reservation rather than a one-off sizing exercise. 5. **Silence about placement.** A rule nobody measures is a preference. The per-domain layout has to be visible next to the numbers people already watch. ## Enforce it at provisioning The decisive operational point is when the rule is applied. Before data exists, satisfying it is a placement decision. Afterwards it is a migration: copies must be moved, one at a time, on a running cluster. So the rule belongs in the path that creates clusters and admits nodes — the domain label comes from the system that knows where the machine physically is, and a node without one does not join. A rule enforced by an annual review is a rule that documents drift rather than preventing it. ## Where it meets the platform The rule survives contact with different designs, but its terms shift: - Where a write commits on a **majority of copies**, the rule is literal. - Where a copy leads and the others must be **caught up**, the majority language becomes "no domain holds enough of the caught-up set to stop writes" — the same placement test against a configured floor. - Where nodes sit on **shared storage** rather than holding copies, the rule applies to the storage system, and you need its answer rather than yours. - Where the cluster is **rented**, the rule becomes a procurement question: how many domains the service spans, whether spreading is contractual or best effort, and what it reports. ## The part a lead actually owns Not the number — the exceptions. Every estate accumulates clusters that cannot satisfy the rule, and the value of having written it down is that each of those becomes a named exception with an owner, a stated failure mode and a review date, rather than a surprise discovered during a rack outage on a Sunday.

  • Why enforce the rule at provisioning rather than by periodic audit?
    Because before data exists, compliance is a placement decision, and afterwards it is a migration on a running cluster. An audit can only report drift that already happened. Putting the domain label in the provisioning path, and refusing nodes without one, makes the compliant layout the only one that can be built.
  • What do you do about a location that has only two independent domains?
    Pick one deliberately: place a tie-breaking member somewhere else so the total is odd, accept an explicit manual intervention that a rehearsed human performs when a domain is lost, or decide production does not run there. The unacceptable option is describing the two-domain layout as highly available and moving on.
  • Should the rule ever require domains far enough apart to survive losing a whole locality?
    Only with a reason, because distance between domains of one cluster sits in the acknowledged write path. Surviving the loss of an entire locality is usually pursued as a separate design rather than by stretching one cluster's copy sets across it.

saying these in an interview costs you the question

  • derives the number of domains from the number of copies
  • assumes every location offers three independent domains
  • labels three racks as three domains without checking they fail independently
  • exempts the membership holding cluster metadata from the rule
  • spreads domains as far apart as possible without noticing what enters the write path
  • writes the rule but only checks it during an annual review