-
-
Notifications
You must be signed in to change notification settings - Fork 49
Description
Describe the bug
This bug may not be seen usually. It was playing 👀 hide and seek for 2~3 weeks. It got revealed during stress testing (single process) and almost 60% of requests failed. It happens only when we have a custom port and hooked up multiple http services and domains on that port.
What's wrong ?
Check config
frontend fe_tcp_8080_test11.ip-13-200-80-4.swiftwave.xyz from unnamed_defaults_1
mode http
maxconn 2000
bind :8080
use_backend be_tes56_80 if { hdr(host) -i test11.ip-13-200-80-4.swiftwave.xyz:8080 }
frontend fe_tcp_8080_test3.ip-13-200-80-4.swiftwave.xyz from unnamed_defaults_1
mode http
maxconn 2000
bind :8080 name :8080
use_backend be_ntfy_80 if { hdr(host) -i test3.ip-13-200-80-4.swiftwave.xyz:8080 }The current config may not looks so bad and HAProxy anyhow managed to work with this config without any kind of error & warning. But large no of requests failding and too many DNS requests goes to docker swarm internal DNS. As a result HAProxy starts taking around 20% CPU of 2 vCPU server.
🙈 It was a blind mistake and ignored as it was working.
We should create single frontend per port and handle subdomains in that block. Like below config,
frontend fe_tcp_8080 from unnamed_defaults_1
mode http
maxconn 2000
bind :8080 name :8080
use_backend be_ntfy_80 if { hdr(host) -i test3.ip-13-200-80-4.swiftwave.xyz:8080 }
use_backend be_tes56_80 if { hdr(host) -i test11.ip-13-200-80-4.swiftwave.xyz:8080 }0 Failed Requests
Approach -
Need to modify haproxy_manager to handle the behaviour.
Warning
Can't be backported to v1. [going to break existing configuration format]
Device Information [optional]
- OS: Ubuntu 22.04
- Swiftwave version: 1.0.5
- Docker version: latestAre you working on this issue?
Yes

