0

I am looking into a problem with some images hosted in the US, that some users get really slow load times. This image for example; http://opencirrus-g0805.hpl.hp.com/books40/UMICH/2160/10/47/23/59/216010472359/SCALE/sp3031.jpg

From the US datacentre using apache bench ab;

Server Hostname:        opencirrus-g0805.hpl.hp.com
Document Path:          /books36/IA/2160/40/00/01/15/216040000115/SCALE/sp0831.jpg
Document Length:        62604 bytes
Failed requests:        0
Requests per second:    1666.38 [#/sec] (mean)
Time per request:       6.001 [ms] (mean)
Transfer rate:          102405.91 [Kbytes/sec] received

from another box in the dc;
Requests per second:    1847.39 [#/sec] (mean)
Time per request:       5.413 [ms] (mean)
Transfer rate:          113526.09 [Kbytes/sec] received

From missouri
Requests per second:    27.88 [#/sec] (mean)
Time per request:       358.700 [ms] (mean)
Transfer rate:          1774.29 [Kbytes/sec] received

ping from missouri
PING opencirrus-g0805.hpl.hp.com (198.55.33.68) 56(84) bytes of data.
64 bytes from opencirrus-g0805.hpl.hp.com (198.55.33.68): icmp_seq=1 ttl=51 time=55.9 ms

From London they are getting very slow
Requests per second:    5.29 [#/sec] (mean)
Time per request:       1891.408 [ms] (mean)
Transfer rate:          358.92 [Kbytes/sec] received

even though ping is much less than the time per request;
PING opencirrus-g0805.hpl.hp.com (198.55.33.68) 56(84) bytes of data.
64 bytes from opencirrus-g0805.hpl.hp.com (198.55.33.68): icmp_seq=1 ttl=54 time=177 ms

So for users in London its taking over a second to download a 62K file, and for users about in the US its taking ~650ms

Is that to be expected, and what can I do to speed things up? (as it appears that locally the web-server is able to serve the files very fast to boxes on the LAN - I am not sure what can be done on the web server side)

Tom
  • 10,886
  • 5
  • 39
  • 62

2 Answers2

1

From the numbers you've cited I'd say your getting quite good bandwidth - certainly you're never going to get the same bandwidth across continents that you'll get within the same country.

Bear in mind that a HTTP request requires at least 2 and a half round trips (TCP handshake, http request/response, close connection). So the overhead on your US connection is 0.0559*2.5 = 0.14 s, and for UK, 0.177*2.5=0.4425 s

So the time taken to actually deliver the content, including any end point processing for US users is 0.51 seconds , and for the UK, 1.45 seconds.

Or 0.95 MBit/s US and 0.3MBit/s for UK.

How do you speed it up? Well you could use a private network service like Akmai IP accelerator (I expect this will be rather expensive if you want to make the content available on the internet in the UK rather than a branch office setup). Or you could use a content delivery network (CDN).

But before you even attempt this you should make sure that your HTTP caching information is optimized.

symcbean
  • 19,931
  • 1
  • 29
  • 49
1

Don't know if serving content (both dynamic and static) from a local edge would be something you are willing to do, but if you are it's not very difficult for an experienced sysadm to setup a akamai alike caching edge in a geographical place. Some alternatives are FS Big-IP, Bluecoat, or the open source Varnish.

3molo
  • 4,340
  • 5
  • 30
  • 46