# Main Functions Of Pd
__*PD function*__
+ Metadata storage for the entire cluster TiKV
+ Generates a Global ID and a Transaction ID
+ Generates a global timestamp TSO 
+ Collects cluster information for scheduling
+ Provides a label to support high availability
+ Provides TiDB Dashboard

------------------------------------------------------------
The main functions of PD are as follows:

1. Metadata storage for the entire cluster TiKV
Information such as the region corresponding to the key range and the TiKV (store) where the region (including information such as leader) is located are stored in PD. For example, TiDB Server obtains route information from PD and then accesses data to the relevant TiKV.
In addition, the topology information and label information of TiKV are also stored in PD, and will be explained in detail later.

2. Assigning a Global ID and a Transaction ID
The global ID we use, such as store ID, region ID, peer ID, table ID, index ID, etc., and the transaction ID of the distributed transaction are also assigned by PD.

3. Generates a global timestamp TSO.
TSO is a global timestamp that guarantees the order of transaction in the database, and a very important function of PD is the generation of TSO. We will introduce the details later.

4. Collect cluster information for scheduling.
The TiKV node periodically reports the status of the cluster to PD. The PD is responsible for scheduling the region between TiKV nodes according to the relevant status. We will introduce the details later.

5. TiDB Dashboard service is provided.
In summary, PD is equivalent to the general control center of the TiDB database. In later sections, we will focus on the functions of generating global timestamp TSO and scheduling.