Wireshark mailing list archives
Re: localhost versus url
From: Jaap Keuter <jaap.keuter () xs4all nl>
Date: Thu, 10 Mar 2011 08:19:12 +0100
Hello Tony,Assuming your domain name is resolved to your public IP address on the outside of the firewall/NAT, your assumption is right.
When entering localhost in the URL, that's resolved to 127.0.0.1, your local machines loopback interface. No Ethernet networking involved, so watching with Wireshark won't show this traffic at all (unless capturing the on the loopback interface on a !Windows machine).
When entering the FQDN in the URL, that's resolved to your outside address. Browser traffic flows to that address first, then comes back to access the Apache server. Now you'll see the traffic when you capture on the network interface, once going out and once coming in.
In the circumstance that there's no NAT involved (so your outside address is your interface address) you still end up with more delay that going through the loopback interface. The extra DNS interactions, and probably additional safety measures of your platform, take away a little time for every object retrieved.
Thanks, Jaap On 03/09/2011 11:11 PM, Tony Anecito wrote:
Hi All, I was running some performance tests last week and noticed with the client app running on the same server or apache web server machine the response time was much better when using localhost in the url versus my domain name. I assumed somehow the connection is bypassing my router and connecting to the apache process directly. Is that so and if not what should I see on Wireshark if anything? Or is even the tcp/ip stack short circuited? Thanks, -Tony
___________________________________________________________________________ Sent via: Wireshark-users mailing list <wireshark-users () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-users Unsubscribe: https://wireshark.org/mailman/options/wireshark-users mailto:wireshark-users-request () wireshark org?subject=unsubscribe
Current thread:
- localhost versus url Tony Anecito (Mar 09)
- Re: localhost versus url David Alanis (Mar 09)
- Re: localhost versus url Tony Anecito (Mar 10)
- Re: localhost versus url Jaap Keuter (Mar 09)
- Re: localhost versus url Guy Harris (Mar 09)
- Re: localhost versus url Tony Anecito (Mar 10)
- Re: localhost versus url Jaap Keuter (Mar 10)
- Re: localhost versus url Tony Anecito (Mar 10)
- Re: localhost versus url David Alanis (Mar 09)