Http/3

From bibbleWiki
Jump to navigation Jump to search

Introduction

This is a page for the new HTTP/3.

Overview

Not an expert but have read [1]. I guess what I took from it was that it will be more pluggable and not tied to propriety implmentation of TCP. This may enable faster progress on improving the protocol going forward. HTTP3.png

Nginx

Building

This is not detailed but here is what I had to do. At the time I was on ubuntu 21.04 and using 1.21.4. Mostly I followed the instructions on here. I cam unstuck when building the packages ie. dpkg-buildpackage -b. This has an error due to GLIB changes.

pagespeed_ol_apr_signal_description_get':
signals.c:(.text.apr_signal_description_get+0xe): undefined reference to sys_siglist' collect2: error :ld return 1 make[1]: *** [objs/Makefile:457:objs/nginx] error 1

This error is with a package called psol which is a binary distribution so we need to build psol manually. The instructions can be found here. This took a long time to get a beer. Once finished you find there still is no psol. You need to run install/build_psol.sh from the source root directory. This will also fail too as we have not fixed the source. We need to

sed -i -r 's/sys_siglist\[signum\]/strsignal(signum)/g' third_party/apr/src/threadproc/unix/signals.c

once build we need to change the directory name to line up with the original nginx build

cd ..
mv incubator-pagespeed-mod include

Now we need to go back to nginx and put fix the soft links. Fir boringssl

cd <nginx_src>/debian/modules
ln -s ~/boringssl .

Now psol

cd <nginx_src>/debian/modules/ngx_pagespeed/psol
mv include include_old
ln -s ln -s ~/bin/incubator-pagespeed-mod include

Now we should be able to build with dpkg-buildpackage -b. Once build install

Configuring

This is an example of my config. In the instruction I followed some of the configuration had been removed.

server {
        server_name www.bibble.co.nz bibble.co.nz;
# Added for http/3
    listen 443 http3 quic reuseport;
    listen 443 ssl http2;

    quic_retry on;
    ssl_early_data on;

#    http3_max_field_size 5000;
    http3_max_table_capacity 50;
    http3_max_blocked_streams 30;
    http3_max_concurrent_pushes 30;
    http3_push 10;
    http3_push_preload on;

    add_header Alt-Svc 'h3=":443"; ma=86400';


        root /mnt/lovelyjubbly;
        index index.php index.html index.htm index.nginx-debian.html;
        access_log /var/log/nginx/www.lovelyjubbly.co.nz.log;
        error_log  /var/log/nginx/www.lovelyjubbly.co.nz.log error;


        ssl_certificate     /etc/letsencrypt/live/www.lovelyjubbly.co.nz/fullchain.pem;
        ssl_certificate_key  /etc/letsencrypt/live/www.lovelyjubbly.co.nz/privkey.pem;

        ssl_protocols       TLSv1.3;
...

Testing

I used https://www.http3check.net to test my site. I found it quite hard to get this to work. Key issues were the version from the instruction I ended up putting the add_header above. Apologies if lovelyjubbly is a real site.