# Pd functions
+ Metadata storage for the entire cluster TiKV
+ Assign a global ID and transaction ID
+ Generating a global timestamp TSO 
+ Collect cluster information for scheduling
+ Provide labels to support high availability
+ Provided TiDB Dashboard
------------------------------------------------------------
The functions of PD are as follows:
  - Metadata storage for the entire cluster TiKV
    Including, the region corresponding to the key range, and the TiKV (store) where the region (including the leader information) is located are stored in the PD. For example, the TiDB Server obtains the routing information from the PD and accesses the data to the related TiKV.
    In addition, the topology information and label information of TiKV are also stored in the PD, and will be described in detail later.

  - Assign a global ID and transaction ID
    The global IDs we use, such as store ID, region ID, peer ID, table ID, index ID, etc., and transaction IDs for distributed transactions are also assigned by PD.

  - Generates a global timestamp TSO.
    TSO is a global timestamp that guarantees the order of transaction in the database. A very important feature of PD is to generate TSO. We will introduce the details later.

  - Collect cluster information for scheduling.
    TiKV nodes periodically report the status of the cluster to the PD, and the PD is responsible for scheduling the region among TiKV nodes according to the relevant status. We will introduce the details later.

  - Provide TiDB Dashboard service.
    In summary, PD is equivalent to the central control center of a TiDB database. In the following sections, we will focus on generating global timestamp TSO and scheduling.