# Tiflash Deployment

+ New deployment
```
tiflash_servers:
  - host: 10.0.1.4
```
  + Suggest a single instance of a single machine
+ scale out deployment
  + Confirm that the current version of TiDB supports TiFlash. Otherwise, you need to upgrade the TiDB cluster to v5.0 later version.
  + `tiup ctl:<cluster-version> pd -u http://<pd_ip>:<pd_port> config set enable-placement-rules true` Execute the command to turn on the placement rules feature of the PD. Or execute the corresponding command via pd-ctl.

------------------------------------------------------------
First, confirm that the current TiDB version supports TiFlash. Otherwise, you need to upgrade the TiDB cluster to v5.0 later version.
Execute the tiup <cluster-version>ctl:pd -u http<pd_ip>://<pd_port>:config set enable-placement-rules true command to enable the placement rules feature of the PD. Or execute the corresponding command via pd-ctl.

There are 2 main ways to deploy TiFlash:
1. New deployment
In this way, you only need to specify the hostname or IP of TiFlash in the topology file. It is recommended to use a single instance of a single machine. As for the default number of deployments, the recommended relationship with TiFlash is 2 (TiFlash) :3 (TiKV), storage is best to use raid.
2. scale out deployment

Note that the TiDB database version needs to be v5.0 or higher for scale out, and the PD enables the Placement Rules function.
In addition, an estimation plan is given:
- single-instance c TiFlash, 150 million table aggregation can be completed in 1 second.
- join 5 tables of 100 million and 10 million, 5 nodes 40 c, which can be completed in 10 seconds.
