Welcome! Log In Create A New Profile

Advanced

Query on diff between nginx 1.18 and nginx 1.20+

Vishwas Bm
March 12, 2024 01:48AM
HI,

We were using the tool from *https://github.com/fstab/h2c
https://github.com/fstab/h2c *and seeing change in behaviour between 1.18
and 1.20+ wrt client_header_timeout configuration.
We suspect change
https://github.com/nginx/nginx/commit/0f5d0c5798eacb60407bcf0a76fc0b2c39e356bb
causing this change in behaviour.
Can we get some thoughts on this ?

Scenario:

>
> *With nginx 1.20+ *
>
> *# h2c connect https://<IP>:449; while true; do sleep 1;h2c ping;done*
> [2024-02-14 15:35:13] -> SETTINGS(0)
> [2024-02-14 15:35:13] <- SETTINGS(0)
> [2024-02-14 15:35:13] <- WINDOW_UPDATE(0)
> [2024-02-14 15:35:13] -> SETTINGS(0)
> [2024-02-14 15:35:13] <- SETTINGS(0)
> [2024-02-14 15:35:14] -> PING(0)
> [2024-02-14 15:35:14] <- PING(0)
> [2024-02-14 15:35:15] -> PING(0)
> [2024-02-14 15:35:15] <- PING(0)
> [2024-02-14 15:35:16] -> PING(0)
> [2024-02-14 15:35:16] <- PING(0)
> [2024-02-14 15:35:17] -> PING(0)
> [2024-02-14 15:35:17] <- PING(0)
> [2024-02-14 15:35:18] -> PING(0)
> [2024-02-14 15:35:18] <- PING(0)
> [2024-02-14 15:35:19] -> PING(0)
> [2024-02-14 15:35:19] <- PING(0)
> [2024-02-14 15:35:20] -> PING(0)
> [2024-02-14 15:35:20] <- PING(0)
> [2024-02-14 15:35:21] -> PING(0)
> [2024-02-14 15:35:21] <- PING(0)
> [2024-02-14 15:35:22] -> PING(0)
> [2024-02-14 15:35:22] <- PING(0)
> [2024-02-14 15:35:23] -> PING(0)
> [2024-02-14 15:35:23] <- PING(0)
> [2024-02-14 15:35:24] -> PING(0)
> [2024-02-14 15:35:24] <- PING(0)
> [2024-02-14 15:35:25] -> PING(0)
> [2024-02-14 15:35:25] <- PING(0)
> [2024-02-14 15:35:26] -> PING(0)
> [2024-02-14 15:35:26] <- PING(0)
> [2024-02-14 15:35:27] -> PING(0)
> [2024-02-14 15:35:27] <- PING(0)
> [2024-02-14 15:35:28] -> PING(0)
> [2024-02-14 15:35:28] <- PING(0)
> [2024-02-14 15:35:29] -> PING(0)
> [2024-02-14 15:35:29] <- PING(0)
> [2024-02-14 15:35:30] -> PING(0)
> [2024-02-14 15:35:30] <- PING(0)
> [2024-02-14 15:35:31] -> PING(0)
> [2024-02-14 15:35:31] <- PING(0)
> [2024-02-14 15:35:32] -> PING(0)
> [2024-02-14 15:35:32] <- PING(0)
> [2024-02-14 15:35:33] -> PING(0)
> [2024-02-14 15:35:33] <- PING(0)
> [2024-02-14 15:35:34] -> PING(0)
> [2024-02-14 15:35:34] <- PING(0)
> Error while reading next frame: EOF
> [2024-02-14 15:35:35] <- GOAWAY(0) << exactly 22s (client_header_timeout set to 22s)
>
>


> TEST 2 (with nginx 1.18)
> *h2c connect https://<IP>:449; while true; do sleep 1;h2c ping; done *
> [2024-02-14 15:46:18] -> SETTINGS(0)
> [2024-02-14 15:46:18] <- SETTINGS(0)
> [2024-02-14 15:46:18] <- WINDOW_UPDATE(0)
> [2024-02-14 15:46:18] -> SETTINGS(0)
> [2024-02-14 15:46:18] <- SETTINGS(0)
> [2024-02-14 15:47:18] -> PING(0)
> [2024-02-14 15:47:18] <- PING(0)
> [2024-02-14 15:48:18] -> PING(0)
> [2024-02-14 15:48:18] <- PING(0)
> [2024-02-14 15:49:18] -> PING(0)
> [2024-02-14 15:49:18] <- PING(0)
> [2024-02-14 15:50:19] -> PING(0)
> [2024-02-14 15:50:19] <- PING(0)
> [2024-02-14 15:51:19] -> PING(0)
> [2024-02-14 15:51:19] <- PING(0)
> [2024-02-14 15:52:19] -> PING(0)
> [2024-02-14 15:52:19] <- PING(0)
>
> --> We are not seeing connection being closed, with client_header_timeout set to 22s.
>
>
*Queries:*
How can we achieve the same behaviour of 1.18 in 1.20+ ? Is it possible to
achieve it ?

Also what is the difference between keepalive_timeout and
client_header_timeout ?

In nginx 1.20+, we are seeing keepalive_timeout closing the connection
before client_header_timeout for below config and it was not the same case
in 1.18.

> keepalive_timeout 10s;

client_header_timeout 22s;




*Thanks & Regards,*

*Vishwas *
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Query on diff between nginx 1.18 and nginx 1.20+

Vishwas Bm March 12, 2024 01:48AM

Re: Query on diff between nginx 1.18 and nginx 1.20+

Sergey A. Osokin March 13, 2024 04:56PM

Re: Query on diff between nginx 1.18 and nginx 1.20+

Vishwas Bm March 14, 2024 12:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 278
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