Cassandra WriteTimeoutException during CAS write query

Author: Kiran

Originally Sourced from:

We have two CAS queries. It was working just fine with 2 containers per region. We have increased containers from 2 to 3 then we started seeing the WriteTimeoutException. The traffic is same or even less compared to the regular business hours. Cassandra is in 3 regions and each cluster has 3 hosts.

Not sure what could be the reason for these errors, but the change was increase in the application container by one. Appreciate if any help here to debug further.

UPDATE order_sequences USING TTL 10 set instance_name = ?  where id_name = ? IF instance_name = null", ConsistencyLevel.QUORUM)
UPDATE order_sequences SET next_id= ? where id_name= ? IF next_id= ? AND instance_name = ?", ConsistencyLevel.QUORUM),

Error stack:

com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during CAS write query at consistency SERIAL (7 replica were required but only 0 acknowledged the write) at
com.datastax.driver.core.exceptions.WriteTimeoutException.copy( at 
com.datastax.driver.core.exceptions.WriteTimeoutException.copy( at 
com.datastax.driver.core.DriverThrowables.propagateCause( at 
com.datastax.driver.core.ChainedResultSetFuture.getUninterruptibly( at 
com.datastax.driver.core.NewRelicChainedResultSetFuture.getUninterruptibly( at com.datastax.driver.core.AbstractSession.execute( at