The nginx docs on the http3 config directive say that it enables HTTP/3 protocol negotiation, and that it defaults to on. However, there is also the quic option on the listen directive. This implies it’s possible to configure nginx to serve QUIC without HTTP/3. Is this so that nginx can serve/proxy non-HTTP/3 but still QUIC-based services? If not, what is it for?
Because QUIC is a UDP-based protocol, we need to use the listen directive to accept UDP connections for HTTP/3. The example configuration in the docs shows this.
Also note that the quic parameter to the listen directive is only available in the http{} context (not stream{}) so that is the only QUIC-based application protocol currently supported.
Yes I know that QUIC uses UDP, and that’s why the listener config is required. My point is that the only protocol supported over QUIC is HTTP/3, and HTTP/3 can’t be used without QUIC, so what is the point of the http3 directive? If I listen for quic, and set http3 off, will it do anything useful at all?
what is the point of the
http3directive?
Gotcha! Good question.
When QUIC+HTTP/3 was released there was some refactoring and alignment of protocol negotiation directives for future consistency. http2 was moved from being a parameter of the listen directive to being a directive in its own right. Because we want protocol negotiation to be part of the http or server contexts (not implied from the listen port). This will be more useful when future QUIC application protocols emerge. For now, not so much.
It might also be useful when the same listen port is shared by multiple server{} blocks but only some of them should use http3 on. ← I didn’t verify that
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.