# Placement Driver server

+ 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 TiDB Dashboard service


![right](./student-guide/diagram/01-PD-01-01.png)
------------------------------------------------------------

- Metadata storage for the entire cluster TiKV
  - Including, the region corresponding to the key range, and the TiKV (store) where the region (including information such as leader) is located are stored in the PD. For example, 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, which will be explained 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.
  - The TiKV node periodically reports the status of the cluster to the PD, which is responsible for scheduling the region among TiKV nodes according to the relevant status. We will introduce the details later.

- Provide TiDB Dashboard service.