Is there any way to implement HTTP/3 (QUIC) in Apache HTTP Server?
Asked Answered
M

2

27

Is there any way I can implement HTTP/3 in Apache?

Edit:

The QUIC protocol has now been made an RFC, see RFC 9000. Waiting for HTTP/3...

OpenSSL said somewhere that they will begin working on QUIC after they release OpenSSL 3.0. Not sure when OpenSSL 3.0 is going to be released.

Until that, maybe we can integrate BoringSSL into Apache, and start testing stuff with QUIC.

Moa answered 20/2, 2020 at 16:9 Comment(0)
X
35

No there is no way at present. Apache has not committed to doing the work required here at this time.

LiteSpeed is an Apache alternative supporting many of the same features, but with strong QUIC and HTTP/3 support.

Nginx also has only made vague comments about QUIC and HTTP/3 but Cloudflare have made an Nginx patch available that adds QUIC and HTTP/3 support. (Edit Nginx have since previewed HTTP/3 support built independently of Cloudflare’s implementation).

Or alternatively Caddy is another alternative server with QUIC and HTTP/3 support.

However, if I were looking to enable, or even just experiment, with QUIC and HTTP/3 I would look to a CDN as they will be the simplest way to enable this and ensure you have optimal settings. Cloudflare has a free plan that (I think) also includes HTTP/3 and QUIC support so is easy to set up in front of a site you own.

Xerox answered 20/2, 2020 at 16:58 Comment(3)
Well HTTP/3 - or more precisely QUIC that underpins it - is a MASSIVE change basically rebuilding much of TCP on top of UDP. So it's a lot of work. The spec is also not even finalised yet (though getting very, very close!) so it could be argued that no one should be implementing this yet! On browser side, Chrome only announced turning it on by default yesterday and the others don't support it without flags. There's also a question as to whether it's gonna need a lot of expertise to manage and better left to expert service providers: almanac.httparchive.org/en/2019/http2#conclusionXerox
LiteSpeed is also heavily monetized and imposes artificial limits based on how much money you pay.Cacique
NGinx since 1.25.0 ships with QUIC. Excellent experience on my side. However this post is cool but it links to alternatives which give some fresh air! (earlier I had only nginx vs apache in head)Lissy
M
1

Temporary solution until Apache supports HTTP/3:

Note: Compile NGINX with quiche, only use this solution when you want to test HTTP/3, as it is not very reliable.

One solution I got is, you can run NGINX using HTTP/3 only on 443 with only QUIC, so it will use UDP.

And, you can use Apache on 443 which will use TCP.

So, you can make Apache send the Alt-Svc header, and make it handle HTTP/0.9, HTTP/1.0, HTTP/1.1 and HTTP/2.0.

And, you can make NGINX like a wrapper around Apache using:

listen 1.2.3.4:443 quic reuseport;
location / {
     proxy_pass https://your-apache-server.tld:443;
}

This just makes you allowed to run:

  • HTTP/0.9
  • HTTP/1.0
  • HTTP/1.1
  • HTTP/2.0 with TLS
  • HTTP/2.0 without TLS, using Upgrade: h2c header to upgrade to it
  • HTTP/2.0 without TLS, using H2Direct in Apache to enable http2-prior-knowledge (not sure what its actually called).
  • HTTP/3.0

FAQ

  • Well, why would you want to do this? Instead just use NGINX!
    If you need some features that apache offers, like HTTP/2 clear text (http upgrade: header or directly), if you don't need those features, you can just stick with NGINX.
    Or if you just want to use Apache for all the main stuff.

Issues

  • I've noticed that nginx has some issues with serving POST requests when the current configuration is deployed.
Moa answered 14/6, 2021 at 13:49 Comment(2)
Thanks for the tip, but can you be more specific about the POST issues? A comment like that makes the rest of your answer not really usable.Multiple
@FrankForte as far as I remember, it just hangs on the request. Or if you tweak some settings (I dont remember which), it works with POST requests but causes epoll errors in the error log. This answer is a little old, as things keep changing day by day in nginx and quiche, I can't confirm it still happens. By my old research, I remember that I saw someone say somewhere that the epoll errors (again, I don't remember what errors) may be caused by apache and nginx running on the same ip address.Moa

© 2022 - 2024 — McMap. All rights reserved.