I am attempting to run multiple (we'll say 2) instances of software in docker. This software is proprietary and 3rd party, so modifying it is not an option, and neither is using docker exec or attach to make changes from inside the containers.
The software in question launches a web GUI at port 80. It also receives traffic on port 50000. The traffic we expect to send to port 50000 is extremely latency sensitive and at 10G.
The host has multiple interfaces:
bond0 172.16.2.10
bond0:0 172.16.2.20
bond0:1 172.16.2.21
em3 172.16.3.10
em4 172.16.4.10
Bond0 is the host's primary connection to the LAN. The aliases 0 and 1 are there because we're running 2 copies of the software, and for simplicity it made sense if they each have their own IP. This might be the wrong approach, so I can remove these aliases if needed.
EM3 and 4 are fiber connections directly to an appliance that will be sending the 10G latency sensitive traffic on port 50000. EM3 is designated for the first instance and EM4 for the second. These assignments are physical and cannot be changed, but if I need to change the configuration of these connections that is fine.
Originally I used the default bridge network for all of this, mapping specific ports and IPs to each container. This worked excellently for connecting at first, the web UIs were accessible and the fiber connections were up. However, I ran into issues soon after: Docker's bridge network driver is limited to 1500 MTU, and the traffic headed over EM3 and EM4 requires an MTU of 9000. Attempts to set the bridge network at MTU 9000 using daemon.json or spinning up a new bridge network have proven unsuccessful.
I really would like to use net=host
for these containers, but port conflicts would immediately occur and not all of the ports that the software requires are customizable. There is no way in the software to bind to specific network interfaces. I also explored macvlan_mode=passthru
, setting up a macvlan for each network interface and assigning the relevant ones to containers, but I am not sure if this is the right path.
Anyone have any ideas?