0

I've a cloud instance with Linode running CentOS 7.2, PHP 7.1, Nginx & Wordpress (latest version). 1 CPU + 2GB RAM.

While checking GTMetrix stats, Connect time is showing as 127ms. I'm trying to find out if I can reduce this time further. What are the factors which affect "Connect time". Do I need to increase server resources (CPU, RAM) or do I need to investigate Nginx & see if can be further optimized or are there other factors which can be tweaked. I'm sure its not just one factor but many of them which are at play.

I'm clueless as to from where should I start.

Any help or pointers are appreciated. Thanksenter image description here

Sanjay
  • 63
  • 2
  • 8

1 Answers1

0

I suspect the reason is latency between the GTMetrix testing server and your website host. I think this because I did tests with connect times as follows:

That tells me your server is likely on the west coast of the USA.

A few options to reduce this time:

  • Run your website in multiple data centers, so the server is closer to the client. You'll need some kind of geo load balancer, Route53 and CloudFlare both offer this (any many others). This is a more complex solution.
  • Use a CDN. Static pages and static resources can be cached. Even dynamic pages can be faster if you use a good CDN which has private backhaul, like AWS Route53.
  • Use http/2 and TLS 1.3 (which might not be quite ready yet). The initial connection may be slower, but due to connection multiplexing overall the page loads should be faster.

I do note that your server doesn't seem that fast from Sydney, a 70kb font took 1100ms to download, so a CDN would help reduce total page load time.

Tim
  • 30,383
  • 6
  • 47
  • 77
  • Thanks for the detailed reply. Since 90% of my traffic comes from US, CA & UK, I'm not much worried about latency from other regions. I'm using AWS Cloudfront CDN for static resource but I get the point. – Sanjay May 08 '18 at 12:49
  • You can use CloudFront for active content. That way the data travels over the AWS backbone rather than the internet, which can be a little faster. – Tim May 08 '18 at 19:00