aboutsummaryrefslogtreecommitdiff
path: root/src/http/v3/ngx_http_v3_module.c
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2020-04-15 18:54:03 +0300
committerVladimir Homutov <vl@nginx.com>2020-04-15 18:54:03 +0300
commit29b6ad00a2166e3b6e9fd159af18c11467e5ea08 (patch)
tree184bdb32c574f24a0618f48574d66bed5d6a56bf /src/http/v3/ngx_http_v3_module.c
parent2e2d1843c3ec3057ed6b8657a9b483ef16cbae80 (diff)
downloadnginx-29b6ad00a2166e3b6e9fd159af18c11467e5ea08.tar.gz
nginx-29b6ad00a2166e3b6e9fd159af18c11467e5ea08.zip
Added primitive flow control mechanisms.
+ MAX_STREAM_DATA frame is sent when recv() is performed on stream The new value is a sum of total bytes received by stream + free space in a buffer; The sending of MAX_STREM_DATA frame in response to STREAM_DATA_BLOCKED frame is adjusted to follow the same logic as above. + MAX_DATA frame is sent when total amount of received data is 2x of current limit. The limit is doubled. + Default values of transport parameters are adjusted to more meaningful values: initial stream limits are set to quic buffer size instead of unrealistically small 255. initial max data is decreased to 16 buffer sizes, in an assumption that this is enough for a relatively short connection, instead of randomly chosen big number. All this allows to initiate a stable flow of streams that does not block on stream/connection limits (tested with FF 77.0a1 and 100K requests)
Diffstat (limited to 'src/http/v3/ngx_http_v3_module.c')
-rw-r--r--src/http/v3/ngx_http_v3_module.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/http/v3/ngx_http_v3_module.c b/src/http/v3/ngx_http_v3_module.c
index 279210337..4306206c9 100644
--- a/src/http/v3/ngx_http_v3_module.c
+++ b/src/http/v3/ngx_http_v3_module.c
@@ -266,18 +266,20 @@ ngx_http_v3_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
NGX_QUIC_DEFAULT_MAX_PACKET_SIZE);
ngx_conf_merge_uint_value(conf->quic.initial_max_data,
- prev->quic.initial_max_data, 10000000);
+ prev->quic.initial_max_data,
+ 16 * NGX_QUIC_STREAM_BUFSIZE);
ngx_conf_merge_uint_value(conf->quic.initial_max_stream_data_bidi_local,
prev->quic.initial_max_stream_data_bidi_local,
- 255);
+ NGX_QUIC_STREAM_BUFSIZE);
ngx_conf_merge_uint_value(conf->quic.initial_max_stream_data_bidi_remote,
prev->quic.initial_max_stream_data_bidi_remote,
- 255);
+ NGX_QUIC_STREAM_BUFSIZE);
ngx_conf_merge_uint_value(conf->quic.initial_max_stream_data_uni,
- prev->quic.initial_max_stream_data_uni, 255);
+ prev->quic.initial_max_stream_data_uni,
+ NGX_QUIC_STREAM_BUFSIZE);
ngx_conf_merge_uint_value(conf->quic.initial_max_streams_bidi,
prev->quic.initial_max_streams_bidi, 16);