You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Re-vendor Mint with larger default HTTP/2 receive windows
Absorbs two new upstream Mint commits on top of the existing vendored
stack:
* `Raise default HTTP/2 receive windows` — bumps Mint's defaults from
the spec-mandated 64 KB to 4 MB per stream and 16 MB per connection.
At typical RTTs (10-150 ms) 64 KB caps throughput far below link
speed; 4/16 MB unlocks ~40 MB/s transcontinental and stream < conn
lets ~4 parallel streams run at full rate before the conn pool binds.
* `Batch HTTP/2 receive-window refills` — gates `WINDOW_UPDATE` on a
configurable threshold (`:receive_window_update_threshold`, default
160_000, ~10× the default max frame size) instead of refilling on
every DATA frame. Mitigates the amplification-DoS shape where a
malicious server sends many tiny DATA frames to force many
WINDOW_UPDATE responses.
On the hex side this means the explicit window tuning that the previous
re-vendor added to `Conn.do_connect` (setting `client_settings:
[initial_window_size: 8_000_000]` and calling `set_window_size(conn,
:connection, 8_000_000)`) is now redundant — Mint's 4/16 MB defaults
already cover hex's bulk-tarball workload. Drop the tuning block and the
`maybe_bump_connection_window/1` helper; `do_connect` now just sets
`protocols: [:http1, :http2]` and lets Mint's defaults handle the rest.
Also:
* Exclude the vendored `lib/hex/mint/**` tree from `.formatter.exs` so
`mix format --check-formatted` doesn't fight upstream formatting
every re-vendor.
* Format drift in `lib/hex/http.ex` and `lib/hex/http/pool.ex` that the
vendored formatter exclusion surfaced.
* Update `scripts/vendor_mint.sh` comment block to list the new
larger-default-windows branch alongside the other pending upstream
items.
0 commit comments