Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 三节点混合部署TiDB配置透传失败
[TiDB Usage Environment] Testing
[TiDB Version] v8.1.0
[Reproduction Path] Operations performed that led to the issue
[Encountered Issue: Problem Description and Impact]
I currently have only 3 virtual machines, with each node deploying TiDB server + TiKV + PD.
Additionally, I want to achieve load balancing and high availability, so I installed HAProxy + Keepalived on each node. I have added the send-proxy parameter in the HAProxy configuration file and also added the proxy-protocol.networks parameter in the TiDB configuration. However, there are still issues with transparency, as executing show processlist; still shows the virtual IP.
Dear experts, how can I achieve transparency and load balancing with this three-node deployment architecture?
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]
Are you referring to this configuration? When there are three nodes, all three nodes need to be configured.
All three nodes are configured, but it’s still useless.
Please send the configuration files for TiDB and HAProxy.
Did you reload after configuring? It will only take effect after reloading.
Indeed, you need to check the configuration parameters or see if there are any error logs.
It seems there might be an issue with the configuration. If you have indeed configured passthrough, with three mixed deployments, and both HAProxy and TiDB are on the same node, then you won’t be able to open the dashboard. Please share the specific configuration file.
Everyone says it’s a configuration file issue. It feels like either it’s configured incorrectly or it hasn’t taken effect.
You need to check the configuration file.
Directly copy the official documentation configuration, I have tested it without any issues.
HAProxy Best Practices in TiDB | PingCAP Documentation Center
It feels like the configuration file didn’t take effect.