Nginx event "blocking" in H2
|Reported by:||Owned by:|
nginx version: nginx/1.18.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
built with OpenSSL 1.1.1r-dev xx XXX xxxx
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --with-http_ssl_module --with-http_v2_module --with-openssl=/home/ly257097/openssl
Description (last modified by )
I found that nginx event cycle could be "blocked” when using H2 because of concurrent streams .
For example, when Nginx’s maximum concurrent streams is 128, if the client sends 128 requests at the same time, nginx will receive 128 requests, and will process 128 requests in one event callback (function ngx_http_v2_read_handler).It’s about 20 milliseconds to processing 128 requests, which means that other connection events will be delayed by 20 milliseconds.
If there is more H2 concurrent streams, it will be worse. how to solve this problem? Thank you.