Which of the two ways is faster to access the services in the docker container?

  docker, question

A service is running in a docker container.
The ip assumption of this container is 172.18.0.4, and port forwarding is done through -p “1234:8888 “.
Which of the following ways is faster to access this service in host?

  • 172.18.0.4:8888

  • 127.0.0.1:1234

In fact, it’s almost the same. It hardly makes any difference.