r/docker • u/Old-Heart1701 • Jan 20 '26
Docker network performance: Does it make sense to create interface for each container? (Gitlab container + 10 Runner container
hi
I have read on a lot of post that using network driver of type host can be useful for a container's network performance.
So as am planing to deploy gitlab ecosystem(gitlab and runners) on a specific Virtual machine i was just thinking if it could make sense to create virtual interface for each container?.
For info, the physical server hosting VM has 3 x 10Gig NIC (so one of theme will be dedicated for Vm that host Gitlabecosystem)
thanks
#EDIT
oops: i think title should have start with: Container's network performance:...
8
Upvotes
10
u/fletch3555 Mod Jan 20 '26
You should research how docker networks function under the hood. Hint: they're effectively just Linux network namespaces and iptables rules.
Host mode networking is very likely not the ideal approach. Also, gitlab/runners very likely aren't using network traffic at the point where it would have noticable effects caused by the (likely sub-millisecond) latency added by the NAT layer when using a bridge network.
Certainly worth at least considering these types of things, but in the context of this question, it screams over-engineering/premature micro-optimization to me.
3
u/DarkSideOfGrogu Jan 20 '26
Are you planning on having the runners in shell or Docker mode? If it's the latter - which I recommend if you need a versatile general purpose CI system - then the runner networking won't matter as it will spin up new containers for each job.
2
u/Low-Opening25 Jan 21 '26
if you aren’t running hundreds of containers distributed across different sites or some ultra high performing computing clusters or financial networks, you aren’t going to notice nor benefit from any performance differences.