0

My site was running on HTTP/1.1 with CloudFront at front, Webpagetest reports the load time usually at 2 seconds. Yesterday I enabled HTTP/2 (and SSL) on CloudFront, expecting to see an improvement. The result is, on the opposite, it becomes slower.

The load time is now around 3 seconds (tested via Webpagetest with different locations). The report shows most assets receive a big increase on TTFB comparing with HTTP/1.1. A 3KB image had 250ms TTFB before, with HTTP/2, it becomes 750ms.

Any advice?


Here are Webpagetest reports, if it helps

HTTP/1.1 https://www.webpagetest.org/result/180518_QY_4ecdf2626af50c5451dedddfbed2aef4/3/details/#waterfall_view_step1

HTTP/2 https://www.webpagetest.org/result/180519_TQ_cb737ae6e67b06da503d34d8d17d2e3a/3/details/#waterfall_view_step1

Edward
  • 101
  • 3
  • Your overall load time is _faster_ on HTTP/2, except for the fonts you are loading from external sites. It may have been a fluke. Try running the tests again. – Michael Hampton May 19 '18 at 08:51
  • @MichaelHampton, tested it again and got 2.9/3.2/2.8s, how do you tell overall load time is HTTP/2 faster? – Edward May 19 '18 at 10:03
  • I think it's expected. TTFB will be larger with SSL because client and server will have to negotiate a secure channel. Also read this: https://blog.cloudflare.com/ttfb-time-to-first-byte-considered-meaningles/ – Sergey Kovalev May 19 '18 at 10:13
  • @SergeyKovalev, too bad, my goal is to reduce the load time to less than 2s, I almost did it with HTTP/1.1 (average 2.1s), it seems I have to go back to HTTP/1.1 and look for another way to optimize – Edward May 19 '18 at 10:20
  • @Edward, your comparison should be between HTTP/1.1 over TLS (explicit), and HTTP/2 over TLS (implicit). It isn't meaningful as you have done it here, because you really shouldn't even be considering *not* using HTTPS, which seems to be what you're doing in the 1.1 test. Compare using https with 1.1 and you should see a more meaningful comparison. – Michael - sqlbot May 19 '18 at 17:19

0 Answers0