Will running Tiflash and HAProxy on the same TiDB node cause resource contention?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: Tiflash和haproxy同一个tidb节点会不会导致资源争用

| username: jingyesi3401

[TiDB Usage Environment] Production Environment, Testing

[TiDB Version] v5.1.0

[Encountered Problem: Phenomenon and Impact]
I have a three-node TiDB setup with IPs 192.168.1.10, 192.168.20.y, and 192.168.1.30. The node 192.168.1.30 is configured for TiFlash queries (corresponding to 192.168.1.80/90), with isolation levels set to tidb and tiflash. The nodes 192.168.1.10 and 192.168.20.y are used for production, and these two TiDB nodes are configured with HAProxy. The HAProxy configuration file and startup service are set on 192.168.1.30. Recently, I noticed that many large queries directly accessing TiFlash are causing congestion in the production cluster. When these large queries are killed, the congestion decreases. I am wondering if sharing 192.168.1.30 in this manner could lead to resource contention, thereby causing the aforementioned issue?

| username: wakaka | Original post link

What does this congestion refer to? According to the description, 1.30 is forwarding to 1.10 and 1.20 TiDB. If these productions are using TiKV, theoretically it shouldn’t be affected.

| username: jingyesi3401 | Original post link

I deployed MQ in my production cluster. When there are large queries on TiFlash, my MQ gets congested. Killing these queries reduces the congestion. This phenomenon did not occur before when we didn’t use HAProxy and allowed the business to directly access 10/20.

| username: xfworld | Original post link

It’s not appropriate to deploy TiDB and TiFlash together. Even if HAProxy uses fewer resources, it’s still not suitable to deploy it with TiFlash. Resource contention will be very severe.

| username: 裤衩儿飞上天 | Original post link

  1. Check where exactly TiFlash is getting blocked.
  2. Determine if using TiFlash for queries is indeed the optimal solution.
| username: WalterWj | Original post link

Yes, but you can consider configuring the CPU and memory.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.