Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion crates/tinymold-remote/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ impl Client {
pub(crate) fn new(config: &RemoteConfig) -> Result<Self> {
let mut endpoint = Endpoint::from_shared(config.endpoint.clone())
.map_err(Error::Connect)?
.connect_timeout(config.timeout);
.connect_timeout(config.timeout)
// With hyper's fixed windows (2 MiB a stream, 5 MiB a
// connection), a read can move at most one window per round
// trip, however fast the link; adaptive windows grow to the
// bandwidth-delay product.
.http2_adaptive_window(true);
if config.uses_tls() {
endpoint = endpoint
.tls_config(ClientTlsConfig::new().with_webpki_roots())
Expand Down
4 changes: 3 additions & 1 deletion docs/specs/remote.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ sharing a key.
outcome is `remote`.

Calls go through ByteStream `Read` for blobs, so blob size is not limited
by the gRPC message size. Once an entry's signature checks out, its
by the gRPC message size. The connection uses HTTP/2 adaptive flow-control
windows, so reads from a distant cache are not held to a fixed window per
round trip. Once an entry's signature checks out, its
objects and its record are read together, within the same limits as a
push's uploads (below), and a pre-key
lookup reads its signature and record together: each read is a round trip,
Expand Down
Loading