5

I am testing my web server for response speed, these are VPS servers (AlmaLinux 9, Apache, Let’s Encrypt SSL certificates), and i am optimizing some laravel apps, html pages, php apps, rest APIs, Apache/php/mysql configs, etc.

What i noticed, is that all of my apps have about ~150ms of 'Initial Connection' time, and that is about 70% of the response time of the fastest apps.

Why or how server/pages like https://www.google.com or https://www.cloudflare.com/ have zero, no initial time or SSL?

Tested on the Google Chrome -> Insepec -> Network -> Timing MyServerResponseTime

2 Answers 2

11

They use HTTP3 which does away with some overhead.

1
  • 1
    This answer is a prime example of being succinct.
    – iBug
    Commented Jun 18 at 17:59
0

A few possible reasons:

  • If you don't see any DNS Lookup / Initial connection / SSL, then there are probably already established connections to those servers which can be re-used.
  • If you see them, but they're shorter than for your server, they have a CDN or other "close" servers which makes the round-trip-time a lot shorter, which in turn makes TCP and TLS handshakes/negotiation a lot shorter as well.

In my case I do see connection/TLS times for Cloudflare (on the actual first connection -- note that a reload will not show that on most pages, because they load stuff every few seconds, which keeps the connection open), though they are shorter than in your screenshot.

For Google it's a lot more difficult to actually have a first connection as Chrome is making calls to them for a large number of things, but when there's one you can see timings as well (again, quite shorter than yours).

The timings shown in your screenshot are a bit on the slow side, which means either your Internet connection is slow or there's quite a bit of latency between you and the server. A CDN may help, but the main thing is to make sure connections stay open (Keepalive), so any connection/SSL time is on the first request, and not on subsequent requests to fetch other resources on the page (CSS, JS, images...).

1
  • I think you're right, its all about already 'opens connections'. Chrome open connections to google and others cdns when process started and keep it alive somehow. Because i can't find any evidence of HTTP/3 on headers to google or any server as other answers states. Commented Jun 20 at 1:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .