One of the websites I have behind it is my gitlab server. That is
always http/2, it never switches to http/3.
Does anyone know why that happens, and whether there is anything I can
do about it? The alt-svc header IS received by the browser.
Browsers unfortunately do not give much information in such cases. Your
best bet is going to {chrome, edge}://net-export/ and recording a session.
Sometimes the browser will be kind enough to acknowledge it with a
reason there, but usually it won't (which is quite infuriating, if
someone working with browser vendors reads this).
Similarly to you, on our site we had the homepage (ie /) refuse to ever
use HTTP3 for the longest time, while all other pages would. Then it
suddenly worked. And then it didn't anymore. etc. Never knew why, never
showed up in net-export nor anywhere else for that matter.
As far as I know, the main way it happens is that the browser:
- races H2 and H3 and picks the fastest (then remember it)
- retries on H2 in case of H3 issue (then remember it)
And how long they remember is not document visibly anywhere that I could
find either (except when it shows up in the net-export, then it says
until when it won't try again, but most of the time it doesn't show up,
again).
You can try something like that to force it to use H3 and reveal
whatever issue it might be having:
chromium-browser --enable-quic
--origin-to-force-quic-on=your-gitlab-host.com:443
And see if anything's broken which would explain why your browser then
refuses to ever use H3 with it.
If you see something then best is to raise an issue; my guess is that
Amaury or Fred will want traces to be able to dig into it (like so
https://github.com/haproxy/haproxy/issues/2004#issuecomment-1398607279)
but that's for them to request if and when they judge it necessary.
Tristan
PS: I see you already do, but for others reading this, you definitely
want 2.7.7 or a 2.8 base after 7b516d3732aab5999fc8f4a3037a4317d35d3618
if you're playing with H3/QUIC. The recent few commits make a
significant difference in compatibility.