Testing HTTP/3 QUIC compatible with HestiaCP

Hi everybody, I’ve been trying to experiment with HTTP/3 since I saw it on cloudflare.
I am checking the main docs on https://quic.nginx.org but will post a guide once I figure it out for debian 10.
I think it’s a good swap for those of us using nginx + php-fpm since it’s supposed to bring a nice speed increase.

So far the steps I am seeing are

  1. Install prerequisites. Build essential, mercurial, libpcre, cmake, zlib1g-dev and a few others.

  2. Install BoringSSL

  3. Compile nginx-quic

  4. Replace current nginx with the one mentioned above and update the configs.

    cd /opt/
    #note below the forum will autoformat libpcre++ -dev you will need to fix it manually
    apt install mercurial build-essential libpcre3-dev libpcre3 libpcre+±dev zlib1g-dev golang cmake
    hg clone -b quic https://hg.nginx.org/nginx-quic
    git clone boringssl - Git at Google
    cd boringssl/
    mkdir build && cd build/
    cmake …
    make
    cd /opt/nginx-quic
    #usen este pastebin para el config porque falla el de abajo config de nginx - Pastebin.com
    ./auto/configure --with-debug --with-http_v3_module
    –with-cc-opt="-I…/boringssl/include"
    –with-ld-opt="-L…/boringssl/build/ssl
    -L…/boringssl/build/crypto" --with-http_v3_module
    –with-http_quic_module --with-stream_quic_module
    make

and that is where I am at so far. next should be running make install and testing it with the new config but I will update shortly when I can set up my environment properly and not break hestia :slight_smile:

next step should be swapping the executable on the service file
/etc/systemd/system/multi-user.target.wants/nginx.service
you would need to change the line
ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf
for
ExecStart=/usr/local/nginx/sbin/nginx -c /etc/nginx/nginx.conf

then do a
systemctl daemon-reload

but when you restart nginx it will start throwing errors because the configuration file needs to be updated, mostly related to some lines that are not used anymore. I will try to debug that soon and we’ll see if with that we can have everything ready

3 Likes

ok I figured out how to make it work.
so nginx has to be compiled with this settings ./auto/configure --with-debug --with-http_v3_module \--with-cc-opt="-I.. - Pastebin.com
and then just replace the service file with the local nginx and restart.
as easy as possible! at least for now :slight_smile:

2 Likes

What are the final results of installing HTTP / 3?

And if you install as recommended by nginx: NGINX QUIC Preview

Has anyone tried this (as suggested by nginx)?

P.S.
In general, it is possible for the administrator to connect to the first question and get tired of the HTTP / 3 button in the panel!

Personal experience shows that nginx php-fpm versus nginx + apache is less fast.
Tests show great performance, but in fact, with the same volume of users (when a lot of them come, or a bully floods) nginx php-fpm crashes faster than nginx + apache.
Therefore, I want to try HTTP / 3 on nginx php-fpm, if there is no improvement, demolish it.

in order to have better performance with volume on php-fpm pools have to be optimized. it’s not easy or simple to do with hestia, should be improved. but I always noticed it worked best.
http/3 doesn’t result in much of an improvement, I was using cloudflare anyways which already helped.

cloudflare doesn’t always work:
1.adsense doesn’t like cdn, and the income immediately drops from caching.
2. In Russia, without regard to thousands of other sites, because of 1 site, millions of ip from cloudflare can be blocked.

Guiditoito, in nginx + php-fpm settings I use, nginx :
# FastCGI settings
fastcgi_buffers 4 256k;
fastcgi_buffer_size 512k;
fastcgi_busy_buffers_size 512k;
fastcgi_temp_file_write_size 512k;
fastcgi_connect_timeout 30s;
fastcgi_read_timeout 300s;
fastcgi_send_timeout 180s;
fastcgi_cache_lock on;
fastcgi_cache_lock_timeout 5s;

Doesn’t work very well, what’s wrong ???

check your pool.d settings on php-fpm. I never had to change anything on nginx apart from a few buffer errors but those were mostly related to php apps sending extremately long headers or things like that.
you have to set them up per domain and when you have a lot of traffic (check your php-fpm logs) you will see that it already ask you to increment the number of child threads, that’s what you should be monitoring

Guiditoito, you are right:
[09-May-2021 06:48:41] WARNING: [pool ru1.su] server reached max_children setting (8), consider raising it

[10-May-2021 20:18:53] NOTICE: using inherited socket fd=7, “127.0.0.1:9000”
[10-May-2021 20:18:53] NOTICE: using inherited socket fd=8, “/run/php/php7.4-fpm-ru1.su.sock”

Increasing pm.max_children = 8 to 16!?

Thanks Guiditoito!
max_children is calculated on the basis of 30-40 MB of memory per thread. For 4 GB I took max_children = 70. Much better.
nginx looked due to buffer errors …

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.