Welcome! Log In Create A New Profile

Advanced

Re: [PATCH 1 of 3] HTTP/3: "quic" parameter of "listen" directive

Maxim Dounin
February 06, 2023 10:14PM
Hello!

On Wed, Feb 01, 2023 at 06:01:08PM +0400, Roman Arutyunyan wrote:

> # HG changeset patch
> # User Roman Arutyunyan <arut@nginx.com>
> # Date 1675254688 -14400
> # Wed Feb 01 16:31:28 2023 +0400
> # Branch quic
> # Node ID 2fcc1c60be1c89aad5464bcc06f1189d1adc885a
> # Parent def8e398d7c50131f8dac844814fff729da5c86c
> HTTP/3: "quic" parameter of "listen" directive.
>
> Now "listen" directve has a new "quic" parameter which enables QUIC protocol
> for the address. Further, to enable HTTP/3, a new directive "http3" is
> introduced. The hq-interop protocol is enabled by "http3_hq" as before.
> Now application protocol is chosen by ALPN.
>
> Previously used "http3" parameter of "listen" is deprecated.
>
> diff --git a/README b/README
> --- a/README
> +++ b/README
> @@ -93,13 +93,13 @@ 2. Installing
>
> 3. Configuration
>
> - The HTTP "listen" directive got a new option "http3" which enables
> - HTTP/3 over QUIC on the specified port.
> + The HTTP "listen" directive got a new option "quic" which enables
> + QUIC as client transport protocol instead of TCP.
>
> The Stream "listen" directive got a new option "quic" which enables
> QUIC as client transport protocol instead of TCP or plain UDP.
>
> - Along with "http3" or "quic", it's also possible to specify "reuseport"
> + Along with "quic", it's also possible to specify "reuseport"
> option [8] to make it work properly with multiple workers.
>
> To enable address validation:
> @@ -133,12 +133,13 @@ 3. Configuration
>
> A number of directives were added that configure HTTP/3:
>
> + http3
> + http3_hq
> http3_stream_buffer_size
> http3_max_concurrent_pushes
> http3_max_concurrent_streams
> http3_push
> http3_push_preload
> - http3_hq (requires NGX_HTTP_V3_HQ macro)
>
> In http, an additional variable is available: $http3.
> The value of $http3 is "h3" for HTTP/3 connections,
> @@ -160,13 +161,15 @@ Example configuration:
> server {
> # for better compatibility it's recommended
> # to use the same port for quic and https
> - listen 8443 http3 reuseport;
> + listen 8443 quic reuseport;
> listen 8443 ssl;
>
> ssl_certificate certs/example.com.crt;
> ssl_certificate_key certs/example.com.key;
> ssl_protocols TLSv1.3;
>
> + http3 on;
> +

Shouldn't "http3" be "on" by default, so it will be used for all
QUIC listening sockets automatically (unless disabled), basically
matching the "listen ... http3" behaviour?

Not sure though, "off" by default seems to better match generic
approach and prevents if from being enabled accidentally. On the
other hand, "listen ... quic" has little to no uses without HTTP/3
being enabled, and requirement to explicitly enable it looks
somewhat silly.

[...]

> diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
> --- a/src/http/ngx_http_core_module.c
> +++ b/src/http/ngx_http_core_module.c
> @@ -4191,6 +4191,11 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx
>
> if (ngx_strcmp(value[n].data, "http3") == 0) {
> #if (NGX_HTTP_V3)
> + ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
> + "the \"listen ... http3\" directive "
> + "is deprecated, use "
> + "the \"http3\" directive instead");

Note that this doesn't provide enough information to rewrite the
configuration. Something like "use the \"listen ... quic\" and
\"http3\" directives instead" should be better (assuming "http3"
is off by default).

> + lsopt.quic = 1;
> lsopt.http3 = 1;
> lsopt.type = SOCK_DGRAM;
> continue;

[...]

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 0 of 3] Directives for enabling http2 and http3

Roman Arutyunyan 870 January 26, 2023 06:52AM

[PATCH 1 of 3] HTTP/3: "quic" parameter of "listen" directive

Roman Arutyunyan 236 January 26, 2023 06:52AM

Re: [PATCH 1 of 3] HTTP/3: "quic" parameter of "listen" directive

Maxim Dounin 204 January 29, 2023 08:28PM

[PATCH 2 of 3] HTTP/3: trigger more compatibility errors for "listen quic"

Roman Arutyunyan 197 January 26, 2023 06:52AM

Re: [PATCH 2 of 3] HTTP/3: trigger more compatibility errors for "listen quic"

Maxim Dounin 151 January 29, 2023 08:28PM

[PATCH 3 of 3] HTTP/2: "http2" directive

Roman Arutyunyan 388 January 26, 2023 06:52AM

Re: [PATCH 3 of 3] HTTP/2: "http2" directive

Maxim Dounin 152 January 29, 2023 08:30PM

[PATCH 0 of 3] Directives for enabling http2 and http3

Roman Arutyunyan 145 February 01, 2023 09:02AM

[PATCH 1 of 3] HTTP/3: "quic" parameter of "listen" directive

Roman Arutyunyan 138 February 01, 2023 09:02AM

Re: [PATCH 1 of 3] HTTP/3: "quic" parameter of "listen" directive

Liam Crilly via nginx-devel 208 February 01, 2023 09:20AM

Re: [PATCH 1 of 3] HTTP/3: "quic" parameter of "listen" directive

Roman Arutyunyan 255 February 01, 2023 09:26AM

Re: [PATCH 1 of 3] HTTP/3: "quic" parameter of "listen" directive

Sergey Kandaurov 165 February 06, 2023 10:28AM

Re: [PATCH 1 of 3] HTTP/3: "quic" parameter of "listen" directive

Maxim Dounin 183 February 06, 2023 10:14PM

Re: [PATCH 1 of 3] HTTP/3: "quic" parameter of "listen" directive

Roman Arutyunyan 140 February 07, 2023 08:40AM

[PATCH 2 of 3] HTTP/2: "http2" directive

Roman Arutyunyan 138 February 01, 2023 09:02AM

Re: [PATCH 2 of 3] HTTP/2: "http2" directive

Maxim Dounin 193 February 06, 2023 10:14PM

Re: [PATCH 2 of 3] HTTP/2: "http2" directive

Roman Arutyunyan 170 February 07, 2023 09:06AM

Re: [PATCH 2 of 3] HTTP/2: "http2" directive

Sergey Kandaurov 141 February 07, 2023 05:26AM

Re: [PATCH 2 of 3] HTTP/2: "http2" directive

Roman Arutyunyan 210 February 07, 2023 08:46AM

[PATCH 3 of 3] HTTP/3: trigger more compatibility errors for "listen quic"

Roman Arutyunyan 149 February 01, 2023 09:02AM

[PATCH 0 of 3] Directives for enabling http2 and http3

Roman Arutyunyan 142 February 07, 2023 09:52AM

[PATCH 1 of 3] HTTP/3: "quic" parameter of "listen" directive

Roman Arutyunyan 281 February 07, 2023 09:52AM

[PATCH 2 of 3] HTTP/2: "http2" directive

Roman Arutyunyan 477 February 07, 2023 09:52AM

Re: [PATCH 2 of 3] HTTP/2: "http2" directive

Sergey Kandaurov 148 February 09, 2023 06:30AM

Re: [PATCH 2 of 3] HTTP/2: "http2" directive

Roman Arutyunyan 164 February 09, 2023 07:04AM

Re: [PATCH 2 of 3] HTTP/2: "http2" directive

Roman Arutyunyan 144 February 09, 2023 07:34AM

Re: [PATCH 2 of 3] HTTP/2: "http2" directive

Sergey Kandaurov 166 February 09, 2023 10:58AM

Re: [PATCH 2 of 3] HTTP/2: "http2" directive

Roman Arutyunyan 110 May 16, 2023 08:40AM

Re: [PATCH 2 of 3] HTTP/2: "http2" directive

Sergey Kandaurov 109 May 30, 2023 09:56AM

Re: [PATCH 2 of 3] HTTP/2: "http2" directive

Maxim Dounin 113 June 02, 2023 05:38PM

Re: [PATCH 2 of 3] HTTP/2: "http2" directive

Roman Arutyunyan 95 June 05, 2023 10:20AM

Re: [PATCH 2 of 3] HTTP/2: "http2" directive

Maxim Dounin 110 June 07, 2023 11:52AM

[PATCH 3 of 3] HTTP/3: trigger more compatibility errors for "listen quic"

Roman Arutyunyan 188 February 07, 2023 09:52AM

Re: [PATCH 0 of 3] Directives for enabling http2 and http3

Sergey Kandaurov 151 February 08, 2023 10:24AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 273
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready