speedtest-go icon indicating copy to clipboard operation
speedtest-go copied to clipboard

enabling tls/ssl causes significant drop in performance

Open budachst opened this issue 3 years ago • 1 comments

Description

Downloaded the latest release which has the tls option and set up speedtest-go using tls/http2 using Letsencrypt certificates. This caused the download speeds to drop to approx. 66% and upload speeds to as low as 30%, compared to non-tls settings.

Server

Running on a LXC Rocky 8.6 Linux install

Client

Firefox 102.01 on macOS Monteray

Steps to reproduce

  • install latest release
  • activate tls/http2

Expected behaviour

Expected mostly the same up- and download speeds over tls or plain Bildschirmfoto 2022-07-24 um 19 13 39

Screenshots

Added screenshots for wired and wireless tests. Lefts ones are without tls, right ones with tls/http2 enabled. Top ones are wired connections, bottom ones are on wireless.

budachst avatar Jul 24 '22 17:07 budachst

HTTP2 Multiplexing mux multi http connection to one connection. Thus, speedtest result will always same as a single connection test result. some technique to solve this, like use different domain, such as cdn1.example.com,cdn2.example.com,cdn2.example.com browser treat them as different host despite their A record points to same host. therefore browser can make multi connection to same host

wen-long avatar Feb 16 '23 07:02 wen-long