Docker only lags 5% in performance while paired with HAProxy makes our bidders 50% slower, any clue why?


#1

More details besides README on GitHub. Our bidders use persistent connections, we configured HAProxy to use http-keep-alive , without http-keep-alive it runs even slower. We disabled docker mesh routing and added HAProxy due to mesh dropping connections to our bidders . Btw, Traefik proxy runs even slower then HAProxy. Here are the numbers on my machine

  • 22K QPS single bidder response outside of docker

  • 20K QPS single bidder response in docker

  • 5K QPS with HAProxy + 1 bidder in docker , HAProxy is part of swarm but mesh routing to HAProxy is disabled

  • 2.5K QPS with Traefik proxy with 1 bidder behind proxy , swarm mesh is disabled , sticky session in traefik enabled

Tested HAProxy outside of docker talking directly to bidder running outside of docker too - 7K QPS

QPS - Queries Per Second

The main question is http-keep-alive is it for both connections to HAProxy and backend sockets where HAProxy re-routes requests ? If http-keep-alive is only for the front-end then I guess I know why it’s so slow .