I have a LAN based site that was setup to resolve via a internal domain like dev.example.com
via host overrides in DNS resolver (overrides LAN request to dev.example.com
to <internalIP:PORT>
). It was fast and worked great. Then we needed to access the site remotely. So i setup NAT/Port Forwarding so that <publicIP:PORT>
resolved to the <internalIP:PORT>
. The NAT setup is lightning fast. Access via WAN is good as expected but LAN access is so much faster to that site now.
A request to <publicIP:PORT>
from the LAN is much faster than request to dev.example.com
from LAN were and I don't know why. I don't have specific time stamps but its so much faster we noticed it right off the bat and speed wasn't an issue before.
Is NAT/Port Forwarding process Faster than DNS Host Overrides?
dns resolving takes time, but if you put hostname and ip into hosts file - then it should be fast too.