I’m wondering about haproxy performance from within a container. To make things simple if I have a vm running haproxy with this cpu config I know what to expect:
nbproc 1 nbthread 8 cpu-map auto:1/1-8 0-7
If I want to port the (whole) config to docker for testing purposes without any fancy swarm magic or setup just docker so that I can understand how things map, I’d imagine that the cpu config gets simpler and that the haproxy instance is meant to scale. I guess I have two questions:
Would you even bother configuring cpu from within an haproxy docker container or would you scale the container from behind a service? Maybe you need both.
Can a single container utilise the above config as though it were running on the system as a daemon? Would docker / containerd even care about this config?
I know having 4 containers each with their own config with the cpu evenly mapped like so wouldn’t scale or make any sense:
nbproc 1 nbthread 2 cpu-map auto:1/1-2 0-1
nbproc 1 nbthread 2 cpu-map auto:1/3-4 2-3
nbproc 1 nbthread 2 cpu-map auto:1/5-6 4-5
nbproc 1 nbthread 2 cpu-map auto:1/7-8 6-7
But it’s this sort of saturation that I’m wondering about. Just how does haproxy / docker handle this sort of cpu nuance?
Source: Docker Questions