title: Cassandra: What happens when an entire datacenter goes down?
body: <p>I have a Cassandra cluster with 3 datacenters of 6 nodes each - DC1, DC2 and DC3 <a href="https://academy.datastax.com/sites/default/files/multi-data-center.png" rel="nofollow">like this</a>. Lets say I have a <code>NetworkTopologyStrategy</code> and while creating a keyspace I do, </p>
  
  <p>CREATE KEYSPACE test WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'DC1' : 3 ,'DC2' : 3,'DC3' : 3 } </p>
  
  <p>which makes sure that any write is replicated on 3 nodes in each datacenter only after which the write is successful.</p>
  
  <p><strong>What happens if an entire datacenter goes down ?</strong> </p>
  
  <p>Lets say all nodes in Dc3 goes down! In this case, a write request to update a table, even with Write consistency level of ONE (<em>Consistency Level: A write must be written to the commit log and memtable of at least one replica node.</em> I would assume it needs to be written to atleast one node in each datacenter.) would fail right ? This request will try to update atleast 3 nodes in DC3, which it cant because of all nodes being down. </p>
  
  <p><a href="https://docs.datastax.com/en/cassandra/2.0/cassandra/architecture/architectureDataDistributeReplication_c.html" rel="nofollow">https://docs.datastax.com/en/cassandra/2.0/cassandra/architecture/architectureDataDistributeReplication_c.html</a></p>