Current time: 05-24-2019, 12:05 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using LetsEncrypt Certificates Properly doubles First Byte Time
04-12-2019, 09:49 PM
Post: #1
Using LetsEncrypt Certificates Properly doubles First Byte Time

Dear Forum,

We are using LetsEncrypt Lego SSL certificates and testing our websites with WebPageTest.org. After repeatedly testing we have concluded that we get a "B" and "820 ms First Byte Time" if we provide our own plus the LetsEncrypt's Intermediate Certificate "Let’s Encrypt Authority X3 (IdenTrust cross-signed)" https://letsencrypt.org/certs/lets-encry...ed.pem.txt

However, if we cut out the intermediate certificate, we get an "A" and "432 ms First Byte Time". So, by not providing an intermediate certificate, we can show a better result to our clients. However, a test like Qualys SSL Labs complains with "This server's certificate chain is incomplete. Grade capped to B."

What is the right thing to do here? A with WebPageTest.org or A with Qualys?

We are using our own server with the newest versions of Apache/OpenSSL/Lego, and loading the certificates like:

SSLCertificateFile "/htdocs/admin/lego/certificates/$hostname.crt"
SSLCertificateKeyFile "/htdocs/admin/lego/certificates/$hostname.key"

We would like have an A with both tests. :-)


Is this possible? Thanks for any suggestions.

Dennis
Find all posts by this user
Quote this message in a reply
04-12-2019, 11:04 PM
Post: #2
RE: Using LetsEncrypt Certificates Properly doubles First Byte Time
Do you have a link to a test result of each? You usually need the intermediate certs but including them shouldn't increase the time by that much. It might have something to do with the size of your TCP initial congestion window or SSL frame size causing an extra round trip for delivering the certs.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-16-2019, 01:56 AM
Post: #3
RE: Using LetsEncrypt Certificates Properly doubles First Byte Time
Hi PMeenan,

Thanks for looking into this:

[Stripped with just the first certificate]
https://www.webpagetest.org/performance_..._byte_time

[Not stripped with first and intermediate certificate]
https://www.webpagetest.org/performance_..._byte_time

How could we change those 2 size parameters you mentioned with Apache httpd?

Thanks for your help.
Dennis.
Find all posts by this user
Quote this message in a reply
04-18-2019, 12:09 AM
Post: #4
RE: Using LetsEncrypt Certificates Properly doubles First Byte Time
Hi / Servus,

The first thing I noticed is that the site appears to be hosted in Germany but you used a US test location. Due to the unavoidable latency between these locations - ssl negotiation will take a bit longer. It does based on the numbers below - add about 90ms in total. Like peeman said - due to the larger certificate - you probably have an additional round trips during the negotiation process.
The TTFB is also a bit different - but that's somewhat normal to have a bit of variation.

I would personally always load the intermediate, without it it's possible some clients may not be able to connect since they cannot verify the entire chain.

All other metrics are very similar.

If your trying to optimize for users that are so far away - then look at either cloudflare or cloudfront style CDN - which will terminate your sites connection as close as possible to the client.


Test 1 (with intermediate)
----------
DNS Lookup: 27 ms
Initial Connection: 138 ms
SSL Negotiation: 261 ms
Time to First Byte: 501 ms
Content Download: 201 ms

Test 2 (Without)
-----------
DNS Lookup: 26 ms
Initial Connection: 140 ms
SSL Negotiation: 171 ms
Time to First Byte: 438 ms
Content Download: 199 ms
Find all posts by this user
Quote this message in a reply
04-18-2019, 02:33 AM
Post: #5
RE: Using LetsEncrypt Certificates Properly doubles First Byte Time
Hi / Servus,

For our EU clients, we generally use US testing stations to identify such issues. In the EU to US setup, based on about 60 tests, we get on average 425 [A] without intermediate and 850 [B] with intermediate. In EU to EU tests, the results are similar with A and B since the grades there are calculated with a lower relative "Target First Byte Time". With a higher relative "Target First Byte Time", the tests from the US provide us a better spread to identify such connecting issues.

We need to know how we can get the A /and/ use the intermediate certificate?!? What parameters can be changed...and where are these?

Thanks so much,

Dennis the Menace.
Find all posts by this user
Quote this message in a reply
04-20-2019, 07:24 PM
Post: #6
RE: Using LetsEncrypt Certificates Properly doubles First Byte Time
Hi,

The first thing I would do - which should be relatively easy is update your apache configuration to use HTTP2 instead of 1.1

If you look at the reports - you can see that the browser must open and negociate SSL multiple times (one for each connection ) so this wastes time overall. With HTTP2 this happens once and then the same connection can handle all the requests.

I would do that firstly and see if it helps at all, it will help with overall performance - but not sure if it would affect your TTFB so much.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)