5

I have pingdom monitor on my website:

http://stats.pingdom.com/t68xhgex256f/375513

For North America (big target market) the response time is 1-2 seconds. This is far too slow.

Is there anything I can do? The server is located in the UK, so distance plays a big part I imagine.

2 Answers 2

4

Relocating the webserver to the US will hugely improve server response time for US users. Investing in better DNS servers will also improve response time, but only for the first request.

The following analysis shows where your speed bottlenecks are at present. (Short version: most of the 1-2 seconds is the time it takes to reach the webserver, not the DNS server.)

Time taken for domain lookup (DNS response)

To determine the speed of the DNS lookup from a computer based in the US, we can use the Unix 'dig' command, or a web-based dig service based in the US, which gives us this response:

; <<>> DiG 9.6.1-P1 <<>> scirra.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39135
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;scirra.com.            IN  A

;; ANSWER SECTION:
scirra.com.     3600    IN  A   84.45.57.143

;; AUTHORITY SECTION:
scirra.com.     165087  IN  NS  ns1.scirra.hypervserver.co.uk.
scirra.com.     165087  IN  NS  ns2.scirra.hypervserver.co.uk.

;; ADDITIONAL SECTION:
ns1.scirra.hypervserver.co.uk. 3600 IN  A   84.45.57.142
ns2.scirra.hypervserver.co.uk. 3600 IN  A   84.45.57.143

;; Query time: 489 msec
;; SERVER: 209.68.2.41#53(209.68.2.41)
;; WHEN: Mon Jul 11 09:17:57 2011
;; MSG SIZE  rcvd: 137

Note the "Query time: 489 msec". That tells us it took 489 milliseconds to resolve the domain name to the server's IP address (which does seem a little slow).

Time taken for server response

Next, we can check how long it takes to reach that IP address from a computer across the pond by using an online traceroute service based in Canada, which gives us the following output:

online traceroute

It takes about 730ms to reach the IP address of your server from Canada.

Conclusions and suggestions for improvement

Now we have enough data to make a conclusion. It's safe to say that the 1-2 second response time you're seeing is largely due to the fact that your server is so far away from visitors in Canada and the US. If a big proportion of your customers are in the US—and you should use your Google Analytics stats to determine this—you may wish to host the site on a server in the US rather than the UK. (You could also keep the UK server and route traffic to the nearest site using a geographical DNS service, but this might be overkill for a small site.)

You could also pay for DNS hosting with a US nameserver host such as DNS Made Easy in order to improve the initial lookup time. You're unlikely to improve it by more than around 300ms or so by doing this, so it might not make as big an impact as moving your server to the US, especially because the DNS lookup happens once per visit whereas page requests to the server are much more frequent, but using a fast DNS server is still worth doing.

0
2

(I can't see your DNS figures on that page.) You can use a different DNS provider which provides a better service, you don't have to use the one that comes with your hosting or your domain name registrar.

Yes, it gets cached, so it's not every request.

12
  • Thanks Paul, the page shows response time (my mistake sorry), isn't a large part of resposne time made by DNS lookup?
    – Tom Gullen
    Jul 11, 2011 at 11:09
  • It plays a part in the response time for the first time they check. It shouldn't be a large part. However as they're checking your site every 5 minutes it should be cached. Jul 11, 2011 at 11:11
  • Thanks again, what causes a slow response time? Is it purely distance + DNS lookup? 1-2 seconds is far too slow for my site, I need it to be a lot faster :(
    – Tom Gullen
    Jul 11, 2011 at 11:12
  • It could be page size or how busy the server is, how congested the bandwidth is at the hosting company. You can use a tool like YSlow to eliminate the first thing and see if it's one of the others. Jul 11, 2011 at 11:15
  • I get 91 on Yslow, I've made sure it's as fast as possible! Primed cache page sizes are 4kb - 7kb as well! I'm going to rephrase/title the question
    – Tom Gullen
    Jul 11, 2011 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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