openspeedtest / Speed-Test

SpeedTest by OpenSpeedTestâ„¢ is a Free and Open-Source HTML5 Network Performance Estimation Tool Written in Vanilla Javascript and only uses built-in Web APIs like XMLHttpRequest (XHR), HTML, CSS, JS, & SVG. No Third-Party frameworks or libraries are Required. Started in 2011 and moved to OpenSpeedTest.com dedicated Project/Domain Name in 2013.
https://openspeedtest.com
MIT License
2.28k stars 221 forks source link

Openspeedtest with TLS reverse proxy. #89

Open tuapuikia opened 1 year ago

tuapuikia commented 1 year ago

Hi, I need some advice. I set up an Nginx reverse proxy with HTTPS and HTTP frontends, and I proxy-pass to an openspeedtest container. I noticed that the bandwidth to the Nginx HTTPS site is 3 times slower than the HTTP site. I enabled kTLS, but it didn't help at all.

openspeedtest commented 1 year ago

Can you post your Nginx config? Did you checked ENABLE_LETSENCRYPT option in docker image?

version: '3.3'
services:
    speedtest:
       environment:
           - ENABLE_LETSENCRYPT=True
           - DOMAIN_NAME=speedtest.yourdomain.com
           - USER_EMAIL=you@yourdomain.com
       restart: unless-stopped
       container_name: openspeedtest
       ports:
            - '80:3000'
            - '443:3001'
       image: openspeedtest/latest
openspeedtest commented 1 year ago

Nginx HTTPS site is 3 times slower than the HTTP site Also Try HTTP1.1

tuapuikia commented 1 year ago

Nginx HTTPS site is 3 times slower than the HTTP site Also Try HTTP1.1

I found the root cause of the bottleneck. My server CPU is too old to handle the TLS encryption.