I use haproxy as edge tcp proxy in front of a Minecraft server.
The minecraft server has to restart daily. When that happens, some users complaint that the latency shoots up to 1000% until a couple of reconnects where it calms down.
Why is this potentially happening and how can I mitigate?
Can you post your haproxy -vvv output and current config? Is your minecraft server [bungee etc. → spigot etc.] or just spigot etc.?
I’m assuming haproxy is being used as an anti-ddos/dos tool
If haproxy is hosted at the same provider and location as your minecraft server, make sure you’re telling haproxy to use your minecraft servers local ip rather than public ip.
Example: server minecraft 10.0.1.1:25565
You should also put Minecraft in a private subnet and keep haproxy in a public subnet if you’re using it for anti-ddos purposes.
In general, most hosting providers implement their own anti-ddos, like ovh, linode, vultr etc. and they’re really effective. So if you’re using haproxy as an anti-ddos tool for minecraft, you might be overcomplicating things.
Anyways, there could be many reasons why it isn’t working very well, but I’ve used HAProxy before in front of minecraft servers with no issues, and and spammed 20Gbps traffic with no disconnects. In my experience, it could be caused by something a simple as a minor quirk with a hosting provider.