pingcap / tiflash

The analytical engine for TiDB and TiDB Cloud. Try free: https://tidbcloud.com/free-trial
https://docs.pingcap.com/tidb/stable/tiflash-overview
Apache License 2.0
940 stars 409 forks source link

Optimization on Kubernetes #1141

Open DanielZhangQD opened 3 years ago

DanielZhangQD commented 3 years ago

Though we already support deploying TiFlash on Kubernetes with TiDB Operator, there are still some optimizations that need to be done to run TiFlash on Kubernetes more gracefully:

  1. The default configurations handling. Currently, there are many configuration parameters that need to be set default values explicitly by both TiDB Operator and TiUP (check this big file to set default config), which is tedious and may not sync up with the behavior change in TiFlash, for example, someday TiFlash may change the default value of one parameter but its default value is not updated in TiDB Operator or TiUP in time.
  2. Many processes are combined in one container This is not a good practice to run applications in the container, usually, one process per container. Currently, there are 3 processes and 4 log files in the TiFlash container, which brings the following restrictions:

Is it possible to deploy the 3 processes in 3 containers in one Pod?

lidezhu commented 3 years ago
  1. Cluster manager is a regularly started process, so it is not necessary to check it's status. And proxy is just a thread. So it's ok to run tiflash in one container.
  2. server.log and proxy.log are the most important log that we needed. Other logs is not necessary to be colloected.