# Raft Vs Multi Raft (A)


![left](./student-guide/diagram/28-Raft-and-Multi-Raft-01-01.png)

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

1. Basic Raft Concepts
Raft is a distributed consistency algorithm. In various components of a TiDB cluster, PD and TiKV both implement data disaster recovery through Raft. Raft's disaster recover capabilities are implement through the following mechanisms:
   - The essence of Raft members is log replication and state machines. Raft members synchronize data by copying logs; Raft members switch their member states under different conditions, with the goal of selecting a leader to provide external services. 
   - Raft is a voting system that follows a majority agreement. In a Raft Group, when a member gets the majority of votes, its member status changes to leader. That is, when a Raft Group still has the majority of nodes (majority), it can select a leader to provide external services.

Follow the characteristics of Raft reliability and put it into the scenario world:
   - To overcome the failure of any 1 server (host), you should provide at least 3 servers.
   - If you want to overcome the failure of any 1 rack, you should provide at least 3 cabinets.
   - To overcome the failure of any 1 data center (DC, also known as computer room), a minimum of 3 data centers should be provided.
   - To deal with disaster scenario in any one city, at least 3 cities should be planned for deployment.

It can be seen that the native Raft protocol is not very friendly to support even replica. Considering the latency impact of cross-city networks, three data centers in the same city may be the most suitable high-availability and disaster recovery solution for deploying Raft.
