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
Install prerequisites. Build essential, mercurial, libpcre, cmake, zlib1g-dev and a few others.
Install BoringSSL
Compile nginx-quic
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
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
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.
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
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 …