Scrivio Interview library
ScenarioIntermediate6 min read · updated 13 November 2026

During a zone outage, writes at QUORUM with replication factor 3 failed with UnavailableException for about a third of the keys, although only one of three zones was down. The keyspace uses SimpleStrategy and every node reports the same rack.

Explain why losing one zone made some quorums impossible, and how you would fix replica placement without downtime.

SimpleStrategy places replicas on the next nodes clockwise around the ring and ignores zones, and since every node reported the same rack, nothing spread them out. For some token ranges two or all three replicas sat in the failed zone, leaving fewer than two live replicas, so QUORUM writes for those keys failed. The fix is to have each node report its zone as its rack, for example with GossipingPropertyFileSnitch, and use NetworkTopologyStrategy; because a node's rack cannot be changed in place, we add correctly labelled nodes as a new logical data center, replicate and rebuild there, move clients, decommission the old nodes, run a full repair, and prove the result by simulating each zone's loss.

Why this question is asked

Teams often spread a cluster over three zones and assume that means replicas are spread over three zones. This incident shows the difference, and interviewers like it because the cause is a configuration default, the fix touches the cluster's topology metadata, and it must be done without downtime. In this answer, we will recap how replicas are placed, see exactly why a third of the keys lost their quorum, fix the snitch and the strategy, migrate safely through a new logical data center, and prove the result.

1A Quick Recap: Tokens, Snitches and Strategies

Cassandra arranges nodes on a token ring. Each partition key hashes to a token, and the replication strategy decides which nodes hold the replicas for that token. The snitch tells Cassandra each node's data center and rack. SimpleStrategy is the most basic strategy: it takes the node that owns the token and the next N - 1 nodes clockwise, and it ignores data centers and racks entirely. NetworkTopologyStrategy places a given number of replicas per data center and, within a data center, walks the ring choosing nodes in different racks before reusing a rack.

Here the keyspace used SimpleStrategy and every node reported the same rack, so even a rack-aware strategy would have had no information to work with.

2Why One Zone Took a Third of the Quorums With It

Suppose nine nodes, three per zone, and the ring order happens to be a1, b1, b2, c1, a2, a3, c2, b3, c3. With SimpleStrategy and RF 3, the token range owned by a2 is replicated on a2, a3 and c2, two of them in zone a. The range owned by a1 is on a1, b1 and b2, only one in zone a. When zone a fails, the first range has one live replica, and QUORUM, which needs two, fails with UnavailableException; the second range still has two and succeeds.

Which ranges are affected depends on how nodes from the same zone happen to sit next to each other on the ring. In this cluster it was about a third of the token ranges, and with virtual nodes it is spread across many small ranges, which is why errors hit a third of the keys rather than particular customers.

Replica placement for some ranges when zone a fails
Range owned byReplicas (SimpleStrategy, RF 3)Live after zone a failsQUORUM?
a1a1, b1, b22works
b2b2, c1, a22works
a2a2, a3, c21fails
a3a3, c2, b32works
c3c3, a1, b12works
NetworkTopologyStrategyone per zone (rack)2 for every rangeworks everywhere
Adjacent nodes in the same zone put two replicas of a range in one failure domain.

3Fixing the Topology Metadata

The fix has two parts. Each node must report its zone as its rack, and the keyspace must use a strategy that reads it. With GossipingPropertyFileSnitch, each node declares its data center and rack in cassandra-rackdc.properties; on cloud providers there are snitches that read the zone from the instance metadata.

Java
# cassandra-rackdc.properties on a new node in zone us-east-1a
dc=dc2
rack=us-east-1a
# cassandra.yaml
endpoint_snitch: GossipingPropertyFileSnitch
-- after the new data center is up
ALTER KEYSPACE billing WITH replication =
{'class': 'NetworkTopologyStrategy', 'datacenter1': 3, 'dc2': 3}; -- datacenter1: the old nodes, one rack

With three racks and RF 3 in a data center, NetworkTopologyStrategy puts exactly one replica in each zone for every range, so losing a zone leaves two live replicas everywhere and QUORUM keeps working.

4Migrating Without Downtime Through a New Data Center

The tempting shortcut is to edit the rack on the existing nodes. Cassandra refuses to start a node whose rack differs from the one it had before, and for good reason: the node's data was placed under the old topology, and silently changing it would leave ranges on the wrong nodes. So the safe path builds a correctly labelled copy alongside the old one.

First, switch the existing nodes to GossipingPropertyFileSnitch with the data center and rack names they reported before (datacenter1 and rack1 under SimpleSnitch), which changes nothing about placement, and change the keyspace to NetworkTopologyStrategy with the old data center at RF 3, which places the same replicas as SimpleStrategy did when there is one data center and one rack. Then add new nodes as a new logical data center, dc2, each with its real zone as its rack. Alter the keyspace to replicate to both data centers, and run nodetool rebuild on each new node to stream the existing data from the old data center. Move clients to dc2 with LOCAL_QUORUM and a data-center-aware load balancing policy. Finally, remove datacenter1 from the keyspace's replication and decommission the old nodes one by one.

Notice that clients never see downtime: the old data center serves traffic until the new one has all the data, and the switch is a client configuration change.

5Repair and Proof

After any change of replication settings, run a full repair so every replica in the new placement holds all the data, including writes that arrived during the migration. Then prove that the result survives a zone loss rather than assuming it. In staging, with the same topology, stop all nodes of one zone and run a check that writes and reads at QUORUM for keys across every token range, or simpler, inspect nodetool describering or getendpoints for a sample of keys and verify that their replicas sit in three different racks. Repeat for each zone.

And keep the rule visible: the number of zones should match the replication factor, three zones for RF 3, with the same number of nodes in each, so that every range has one replica per zone and a zone loss always leaves a majority.

6Follow-up questions

Why is it risky to run replication factor 3 across only two zones?

Three replicas cannot be split evenly across two zones, so every range has two replicas in one zone and one in the other. When the zone holding two fails, only one replica remains and QUORUM fails for those ranges, which with balanced racks is roughly half of all data. RF 3 needs three zones for QUORUM to survive any single zone loss.

Can we just run ALTER KEYSPACE to NetworkTopologyStrategy and repair?

Only if the racks are already correct. Here every node reports one rack, so NetworkTopologyStrategy would place replicas exactly as before. The rack labels must be fixed first, and that requires new nodes.

Does SimpleStrategy have any place in production?

Generally no. It ignores data centers and racks, so even single-zone clusters are better served by NetworkTopologyStrategy, which makes later expansion possible without a migration.

7Conclusion

In this answer, we saw that SimpleStrategy places replicas on consecutive ring nodes and ignores zones, and with every node in one rack, some ranges had two or three replicas in the failed zone, so QUORUM failed for about a third of the keys. The fix is rack labels from a proper snitch and NetworkTopologyStrategy, reached without downtime by building a correctly labelled new data center, rebuilding it, moving clients and decommissioning the old nodes, followed by a full repair and a simulated loss of each zone. RF 3 needs three zones.

What to say in the interviewAbout 100 seconds aloud

Open with

SimpleStrategy places the replicas of a range on the owning node and the next two nodes clockwise on the ring, and it does not look at zones at all.

Then, if they want more

Every node also reported the same rack, so nothing told Cassandra that nodes were in different zones. Wherever two or three nodes from the same zone are adjacent on the ring, a range had two or three replicas in that zone.

When the zone failed, those ranges had only one live replica, QUORUM needs two, and writes for about a third of the keys failed with UnavailableException. The fix is to make each node report its zone as its rack, with GossipingPropertyFileSnitch and cassandra-rackdc.properties or a cloud snitch, and use NetworkTopologyStrategy, which puts one replica per rack.

But you cannot change a node's rack in place; Cassandra refuses to start.

So I would do it without downtime by building a new logical data center: switch the old nodes to the new snitch with their existing names, move the keyspace to NetworkTopologyStrategy, add new nodes labelled with their real zones as dc2, replicate the keyspace there and run nodetool rebuild, move clients to dc2 with LOCAL_QUORUM, then remove the old data center from replication and decommission it.

After that, a full repair, and then proof: in staging, stop each zone in turn and check QUORUM for every range. And the rule going forward is three zones for RF 3, with equal nodes in each.

About this answer

Last updated
13 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Explain why losing one zone made some quorums impossible, and how you would fix replica...": https://scrivio-interview-library.netlify.app/architecture/partitioning-and-replication/72c97fd0b5/