Is there any reason *not* to run HAProxy in a Docker container? [closed]

Solution 1:

There is a good SO answer at https://stackoverflow.com/a/26149994/684908 on the subject of performance. The tl;dr is that the NAT (port-forwarding in some cases) introduces some latency. Though, it is likely negligible at smaller scales.

I run HAProxy as a container in production with port-forwarding through the Docker NAT bridge. The application and HAProxy was originally running on bare-metal. Any latency or overhead that might have been introduced by Docker is too negligible to tell.

Solution 2:

The chief concern should be that you will have to wait for the container to be updated before getting any security, feature, or bugfix patches. You can't just run yum/apt-get/yast upgrade on the host, you need to either rebuild the container yourself, or wait for someone else to.