cloudflare / cloudflare/quiche

almost_full tends to true

Open
#983 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
11.8k
Forks
1.1k
Avg merge
21h 9m
Merged PRs (30d)
6

Description

The following is only theoretical as I've not checked if it happens or not. But looking at the code and running some simplified computations, I have the impression that the almost_full function may tends to true once the received offset is sufficiently large compared to the initial max_data.

Here, `max_data_next` is increased by the `len` of the emited packets.
https://github.com/cloudflare/quiche/blob/f86de8f18e930f823e00b43b08eee47dc52aa635/src/stream.rs#L872

and `almost_full` is true if `max_data_next/2 > max_data - len` (here, `len` is the total length received).
https://github.com/cloudflare/quiche/blob/f86de8f18e930f823e00b43b08eee47dc52aa635/src/stream.rs#L951

I believe `max_data_next` increases constantly but `max_data - (total)_len` is heuristically bounded by the regular increase of `max_data`. Supposing that this bound is the initial value of `max_data`, then once `max_data_next > 2*initial_max_data` the stream tends to be always declared almost full.

If this is indeed true, the practical implication would be that MAX_STREAM_DATA frames would be send at a high frequency once this threshold is passed. Is it the behavior intended?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.