Mercurial > hg > nginx-quic
comparison src/http/v3/ngx_http_v3_module.c @ 7815:0f9e9786b90d quic
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)
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 15 Apr 2020 18:54:03 +0300 |
parents | 0b95c2041887 |
children | a8fc0ab54cea |
comparison
equal
deleted
inserted
replaced
7814:ab443e80d9e4 | 7815:0f9e9786b90d |
---|---|
264 ngx_conf_merge_uint_value(conf->quic.max_packet_size, | 264 ngx_conf_merge_uint_value(conf->quic.max_packet_size, |
265 prev->quic.max_packet_size, | 265 prev->quic.max_packet_size, |
266 NGX_QUIC_DEFAULT_MAX_PACKET_SIZE); | 266 NGX_QUIC_DEFAULT_MAX_PACKET_SIZE); |
267 | 267 |
268 ngx_conf_merge_uint_value(conf->quic.initial_max_data, | 268 ngx_conf_merge_uint_value(conf->quic.initial_max_data, |
269 prev->quic.initial_max_data, 10000000); | 269 prev->quic.initial_max_data, |
270 16 * NGX_QUIC_STREAM_BUFSIZE); | |
270 | 271 |
271 ngx_conf_merge_uint_value(conf->quic.initial_max_stream_data_bidi_local, | 272 ngx_conf_merge_uint_value(conf->quic.initial_max_stream_data_bidi_local, |
272 prev->quic.initial_max_stream_data_bidi_local, | 273 prev->quic.initial_max_stream_data_bidi_local, |
273 255); | 274 NGX_QUIC_STREAM_BUFSIZE); |
274 | 275 |
275 ngx_conf_merge_uint_value(conf->quic.initial_max_stream_data_bidi_remote, | 276 ngx_conf_merge_uint_value(conf->quic.initial_max_stream_data_bidi_remote, |
276 prev->quic.initial_max_stream_data_bidi_remote, | 277 prev->quic.initial_max_stream_data_bidi_remote, |
277 255); | 278 NGX_QUIC_STREAM_BUFSIZE); |
278 | 279 |
279 ngx_conf_merge_uint_value(conf->quic.initial_max_stream_data_uni, | 280 ngx_conf_merge_uint_value(conf->quic.initial_max_stream_data_uni, |
280 prev->quic.initial_max_stream_data_uni, 255); | 281 prev->quic.initial_max_stream_data_uni, |
282 NGX_QUIC_STREAM_BUFSIZE); | |
281 | 283 |
282 ngx_conf_merge_uint_value(conf->quic.initial_max_streams_bidi, | 284 ngx_conf_merge_uint_value(conf->quic.initial_max_streams_bidi, |
283 prev->quic.initial_max_streams_bidi, 16); | 285 prev->quic.initial_max_streams_bidi, 16); |
284 | 286 |
285 ngx_conf_merge_uint_value(conf->quic.initial_max_streams_uni, | 287 ngx_conf_merge_uint_value(conf->quic.initial_max_streams_uni, |