Docker Community Forums

Share and learn in the Docker community.

Networking modes

Would there be any difference in the response time for a request reaching a swarm service created using --network host mode and the same swarm service only with --publish published=<PUBLISHED-PORT>,target=<CONTAINER-PORT>,mode=host

Eg:

docker service create --name httpd --publish published=8080,target=80,protocol=tcp,mode=host httpd:latest
(just bypassing routing mesh)
and

docker service create --name httpd --network host httpd:latest
(joining host network)

Please clarify.

An example use case for both would also help.