From dc79db462698b45b2d2cd98402a60e63d00b575a Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Fri, 16 Oct 2026 04:00:06 +0530 Subject: [PATCH 1/3] chore: files changed crates/tinymold-remote/src/client/mod.rs Auto-committed-on: macbook --- crates/tinymold-remote/src/client/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/tinymold-remote/src/client/mod.rs b/crates/tinymold-remote/src/client/mod.rs index c3adc7a..b42e333 100644 --- a/crates/tinymold-remote/src/client/mod.rs +++ b/crates/tinymold-remote/src/client/mod.rs @@ -60,7 +60,11 @@ impl Client { pub(crate) fn new(config: &RemoteConfig) -> Result { let mut endpoint = Endpoint::from_shared(config.endpoint.clone()) .map_err(Error::Connect)? - .connect_timeout(config.timeout); + .connect_timeout(config.timeout) + // hyper's fixed windows (2 MiB a stream, 5 MiB a connection) cap + // reads from a cache an ocean away at ~40 MiB/s, 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()) From 6824ac2371424980dbb08f279a54f0a8d611d06f Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Fri, 16 Oct 2026 04:00:56 +0530 Subject: [PATCH 2/3] perf(remote): use adaptive HTTP/2 windows for the cache connection Co-authored-by: Medulla --- docs/specs/remote.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/specs/remote.md b/docs/specs/remote.md index d115c2d..3f95f1b 100644 --- a/docs/specs/remote.md +++ b/docs/specs/remote.md @@ -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, From 06094be00138487721e8ff0801a5e26237573834 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Fri, 16 Oct 2026 04:05:53 +0530 Subject: [PATCH 3/3] docs(remote): state the window limit as a bound, not a measurement Co-authored-by: Medulla --- crates/tinymold-remote/src/client/mod.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/tinymold-remote/src/client/mod.rs b/crates/tinymold-remote/src/client/mod.rs index b42e333..3d898ad 100644 --- a/crates/tinymold-remote/src/client/mod.rs +++ b/crates/tinymold-remote/src/client/mod.rs @@ -61,9 +61,10 @@ impl Client { let mut endpoint = Endpoint::from_shared(config.endpoint.clone()) .map_err(Error::Connect)? .connect_timeout(config.timeout) - // hyper's fixed windows (2 MiB a stream, 5 MiB a connection) cap - // reads from a cache an ocean away at ~40 MiB/s, however fast the - // link; adaptive windows grow to the bandwidth-delay product. + // 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