curl --trace-time shows 3 seconds lag between Client Hello and Server Hello when accessing from cellular. Firefox, Chrome, Android, desktop linux (wired tethering same 5G) everything I tested gives the same 2.5-3.5 lag on the initial connection, after that ssl session is kept and all works as a charm.
At the moment I can reproduce it with 100% on Hotmobile 5G (Israel), I think it has been like that for a while. I can't reproduce it on my other connections and it seems my friends in Israel and worldwide who I asked are not experiencing it. BUT:
It does reproduce sometimes on pagespeed.web.dev on mobile tab, which uses "Network throttling: 150 ms TCP RTT, 1,638.4 kb/s throughput (Simulated)", never on the desktop tab. Yesterday it was so stable, that I didn't even think of taking screenshoot lol.
I can't blame entirely ISP, because the same curl gives no lag for google.com, stackoverflow.com, unsplash.com, etc, and web surfing, in general, feels fast. However... I do see this issue on some sites with LE, including letsencrypt.org itself (!!!). That's why I am finally here. Also does pagespeed
My domain is screentranslate.app with t3 micro behind and virtually no load.
I am not a guy to blame others first, so I tried a lot of stuff I lost track of. Apache configs (e.g. minifying config, tls v.1.3, http2), changing mtu on EC2 from 9000 to 1500 and 500, nothing made a visible difference. Ditched Apache, set up HAProxy (you can see it with the same cert on port 444), configured OCSP stapling didn't change a thing. (I assumed success by running openssl s_client -connect screentranslate.app:444 -status | grep -E 'OCSP|'
, for some reason, I can't see the same for letsencrypt.org, but I do for gogl. Pls confirm whether I succeeded or not)
Up-to-date Ubuntu 22.04.4 LTS, Apache 2.4.52-1ubuntu4.9, HAproxy 2.4.24-0ubuntu0.22.04.1. In case you need any diag data, I have full ssh access.
time (echo | openssl s_client -debug -connect $IP:$PORT -servername screentranslate.app)
- gives <20ms from localhost to both 443 (apache) and 444 (haproxy)
- gives 3.1-3.3s on named 5G to both
I was unable to see any collateral requests with tcpdump (idk, i expected some queries to CAs about domain validity, that could take extra time), dump looks similar to google.com.
time curl -s --trace-time -vI https://screentranslate.app:443 -o /dev/null
20:52:59.566709 * Trying 51.16.158.30:443...
20:52:59.602526 * Connected to screentranslate.app (51.16.158.30) port 443 (#0)
20:52:59.609275 * ALPN, offering h2
20:52:59.609391 * ALPN, offering http/1.1
20:52:59.686368 * CAfile: /etc/ssl/certs/ca-certificates.crt
20:52:59.686393 * CApath: /etc/ssl/certs
20:52:59.686584 * TLSv1.0 (OUT), TLS header, Certificate Status (22):
20:52:59.686611 } [5 bytes data]
20:52:59.686648 * TLSv1.3 (OUT), TLS handshake, Client hello (1):
20:52:59.686668 } [512 bytes data]
20:53:02.957691 * TLSv1.2 (IN), TLS header, Certificate Status (22):
20:53:02.957812 { [5 bytes data]
20:53:02.958002 * TLSv1.3 (IN), TLS handshake, Server hello (2):
20:53:02.958112 { [122 bytes data]
20:53:02.959047 * TLSv1.2 (IN), TLS header, Finished (20):
20:53:02.959172 { [5 bytes data]
20:53:02.959389 * TLSv1.2 (IN), TLS header, Supplemental data (23):
20:53:02.959501 { [5 bytes data]
20:53:02.959713 * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
20:53:02.959820 { [19 bytes data]
20:53:02.960013 * TLSv1.2 (IN), TLS header, Supplemental data (23):
20:53:02.960125 { [5 bytes data]
20:53:02.960361 * TLSv1.3 (IN), TLS handshake, Certificate (11):
20:53:02.960466 { [2393 bytes data]
20:53:02.965182 * TLSv1.2 (IN), TLS header, Supplemental data (23):
20:53:02.965307 { [5 bytes data]
20:53:02.965509 * TLSv1.3 (IN), TLS handshake, CERT verify (15):
20:53:02.965595 { [79 bytes data]
20:53:02.966197 * TLSv1.2 (IN), TLS header, Supplemental data (23):
20:53:02.966311 { [5 bytes data]
20:53:02.966543 * TLSv1.3 (IN), TLS handshake, Finished (20):
20:53:02.966660 { [52 bytes data]
20:53:02.967016 * TLSv1.2 (OUT), TLS header, Finished (20):
20:53:02.967132 } [5 bytes data]
20:53:02.967307 * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
20:53:02.967410 } [1 bytes data]
20:53:02.967682 * TLSv1.2 (OUT), TLS header, Supplemental data (23):
20:53:02.967794 } [5 bytes data]
20:53:02.967987 * TLSv1.3 (OUT), TLS handshake, Finished (20):
20:53:02.968092 } [52 bytes data]
20:53:02.968432 * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
20:53:02.968552 * ALPN, server accepted to use h2
20:53:02.968662 * Server certificate:
20:53:02.968775 * subject: CN=screentranslate.app
20:53:02.968884 * start date: May 9 05:18:16 2024 GMT
20:53:02.968993 * expire date: Aug 7 05:18:15 2024 GMT
20:53:02.969110 * subjectAltName: host "screentranslate.app" matched cert's "screentranslate.app"
20:53:02.969223 * issuer: C=US; O=Let's Encrypt; CN=R3
20:53:02.969321 * SSL certificate verify ok.
20:53:02.969478 * Using HTTP2, server supports multiplexing
20:53:02.969590 * Connection state changed (HTTP/2 confirmed)
20:53:02.969702 * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
20:53:02.969836 * TLSv1.2 (OUT), TLS header, Supplemental data (23):
20:53:02.969940 } [5 bytes data]
20:53:02.970177 * TLSv1.2 (OUT), TLS header, Supplemental data (23):
20:53:02.970289 } [5 bytes data]
20:53:02.970478 * TLSv1.2 (OUT), TLS header, Supplemental data (23):
20:53:02.970621 } [5 bytes data]
20:53:02.970861 * Using Stream ID: 1 (easy handle 0x56055daf1e90)
20:53:02.971030 * TLSv1.2 (OUT), TLS header, Supplemental data (23):
20:53:02.971164 } [5 bytes data]
20:53:02.971369 > HEAD / HTTP/2
20:53:02.971369 > Host: screentranslate.app
20:53:02.971369 > user-agent: curl/7.81.0
20:53:02.971369 > accept: */*
20:53:02.971369 >
20:53:03.007687 * TLSv1.2 (IN), TLS header, Supplemental data (23):
20:53:03.007806 { [5 bytes data]
20:53:03.008097 * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
20:53:03.008179 { [57 bytes data]
20:53:03.008472 * TLSv1.2 (IN), TLS header, Supplemental data (23):
20:53:03.008579 { [5 bytes data]
20:53:03.008781 * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
20:53:03.008890 { [57 bytes data]
20:53:03.009105 * old SSL session ID is stale, removing
20:53:03.009234 * TLSv1.2 (IN), TLS header, Supplemental data (23):
20:53:03.009336 { [5 bytes data]
20:53:03.009567 * TLSv1.2 (OUT), TLS header, Supplemental data (23):
20:53:03.009678 } [5 bytes data]
20:53:03.025030 * TLSv1.2 (IN), TLS header, Supplemental data (23):
20:53:03.025150 { [5 bytes data]
20:53:03.025382 * TLSv1.2 (IN), TLS header, Supplemental data (23):
20:53:03.025462 { [5 bytes data]
20:53:03.025689 < HTTP/2 200
20:53:03.025859 < last-modified: Sun, 21 Apr 2024 22:06:51 GMT
20:53:03.025978 < etag: "106c1-616a289ba5f8d"
20:53:03.026082 < accept-ranges: bytes
20:53:03.026188 < content-length: 67265
20:53:03.026283 < vary: Accept-Encoding
20:53:03.026381 < content-type: text/html
20:53:03.026482 < date: Mon, 01 Jul 2024 17:53:02 GMT
20:53:03.026581 < server: Apache/2.4.52 (Ubuntu)
20:53:03.026683 <
20:53:03.026799 * Connection #0 to host screentranslate.app left intact
real 0m3.488s
Is it time for paid SSL? Kiddin, I am in love with LE, level of automation and configuration, I don't believe I can find anything like this for money I have, or maybe at all. Thank you guys for your work.