# Online Scale Out (TiFlash)

__*TiDB online scale out*__
__*TiFlash online scale out*__

+ Step 1: First, confirm that the current TiDB version supports TiFlash
+ Step 2: Enable-placement-rules opening parameters
+ Step 3: Edit the scale-out topology (scale-out topology)
```
vi scale-out.yaml

tiflash_servers:
  - host: 10.0.1.4
```
+ Step 4: Execute the scale out order
  + `tiup cluster scale-out <cluster-name> scale-out.yaml`

+ Step 5: Confirm whether the new node has joined
  + `tiup cluster display <cluster-name>`

-------------------------------------------------------------
Scaling TiFlash nodes scale out slightly different from TiDB/TiKV/PD. You need to add 2 steps as follows:

Step 1: First, confirm that the current TiDB version supports TiFlash. If not, you need to upgrade the TiDB cluster to v5.0 later version.

Step 2: Enable the PD Placement Rules function with the parameter enable-placement-rules.
tiup <cluster-version>ctl:pd -u http://<pd*ip>: <pd*port>config set enable-placement-rules true

Step 3: Edit the scale-out topology (scale-out topology)
Let's assume that the IP of the TiFlash node joined is 10.0.1.4
vi scale-out.yaml
```
tiflash_servers:
  - host: 10.0.1.4
```

Step 4: Run scale out command
Run scale out command:
tiup cluster scale-out <cluster-name>scale-out.yaml
Appears after successful execution: "scaled cluster <cluster-name>out of expansion" indicates successful scale out.

Step 5: Confirm whether the new node has joined
Check the cluster status to confirm that the new nodes have joined, as follows:
tiup cluster display <cluster-name>

Please refer to the documentation: https://docs.pingcap.com/zh/tidb/stable/scale-tidb-using-tiup