Poor network performance with outside-of-host connections

Hey folks!

So I’ve been using Docker for a LAMP application being deployed on Google Container Engine. So far on the production server, everything is super fast and an absolute joy, but Docker running on my local device (Docker for Mac) has been suffering from absolutely brutally slow database connections.

If I spin up a Dockerized version of MySQL, and run it as another service on my local machine, communication between the web server and the DB are very quick. The problem comes when I put the MySQL server on another machine. Even though the other machine is feet away from me, on the same network, I’m getting a penalty of somewhere around 50-100%, where requests that only take about 2-3 seconds when the DB is running on my local machine, skyrocket up to 20-30 seconds, in some cases more.

I have been banging my head against this problem for a few days and have not been able to make any headway.

My docker info output:
Containers: 5
Running: 0
Paused: 0
Stopped: 5
Images: 23
Server Version: 1.12.1
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 85
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Volume: local
Network: bridge null overlay host
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.20-moby
Operating System: Alpine Linux v3.4
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.787 GiB
Name: moby
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 16
Goroutines: 27
System Time: 2016-10-28T21:10:38.666379472Z
EventsListeners: 1
Registry: https://index.docker.io/v1/
Insecure Registries: