# Two data centers within the same city (B)


![left](./student-guide/diagram/29-Two-center-structure-in-the-same-city-02-01.png)

------------------------------------------------------------

Synchronous switching to asynchronous: PD determines if the TiKV is down or disconnected by periodically checking the TiKV's heartbeat information. If the number of outages exceeds the number of primary-replicas and dr-replicas for each of the PRIMARY/DR replicas, it means that synchronous replication cannot be completed and the state needs to be switched. When the downtime exceeds the time set by the wait-store-timeout, the PD switches the cluster state to async (asynchronous replication) mode. The PD then sends an async state to all TiKV nodes, and the replication mode of TiKV is changed from dual-center synchronization to the native Raft majority implementation method (majority).