Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've installed httping command on my OS X Mavericks through homebrew, and tried to use it to connect to apple's web site in two different ways, but got dramatically different performances.

When I tried to connect to it using httping apple.com, the response time was about 240 ms. However, when I connected by writing httping http://www.apple.com, the time was reduced to about 16 ms, which is more than 10 times faster if I understand it correctly.

Moreover, it looks like the former send 147 bytes while the latter 228 bytes.

So where does the result originate? And which one should I use to correctly measure the response time?

Note that ping http://www.apple.com doesn't work at all - it's the reason I installed httping to begin with.

Thanks.

share|improve this question

migrated from serverfault.com Feb 13 at 22:49

This question came from our site for professional system and network administrators.

1  
So where does the result originate? And which one should I use to correctly measure the response time? - Why do you think you need to measure the response time to Apple? What are you actually trying to learn? Why do you think connecting to Apple is the best test? Apple like any huge web site is going to be distributed across a large number of systems and locations. Trying to measure the response time is meaningless. –  Zoredache Feb 12 at 19:59
    
It doesn't have any meanings to use Apple's site - it's just that I picked it up to learn about how to use httping command. –  user2360798 Feb 12 at 22:07

1 Answer 1

up vote 3 down vote accepted

Well the two names apple.com and www.apple.com resolve to completely different addresses. One appears to be a CDN. Since you are connecting to different systems, it is not at all surprising that you are getting completely different results.

root@server:/etc/nagios3# host apple.com
apple.com has address 17.149.160.49
apple.com has address 17.178.96.59
apple.com has address 17.172.224.47

root@server:/etc/nagios3# host www.apple.com
www.apple.com is an alias for www.isg-apple.com.akadns.net.
www.isg-apple.com.akadns.net is an alias for www.apple.com.edgekey.net.
www.apple.com.edgekey.net is an alias for e3191.dscc.akamaiedge.net.
e3191.dscc.akamaiedge.net has address 2.19.141.15
e3191.dscc.akamaiedge.net has IPv6 address 2600:1409:a:1a4::c77
e3191.dscc.akamaiedge.net has IPv6 address 2600:1409:a:1a3::c77
share|improve this answer
    
Sorry for the confusion of the use of Apple's. Then which one should I use when I develop my own web service? –  user2360798 Feb 12 at 22:10
    
Which one what? That question doesn't really make sense without context. –  Zoredache Feb 12 at 22:44
    
@user2360798 When you develop your own web service, you should use the name of the web service. –  David Schwartz Feb 13 at 4:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.