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
{{ message }}
Repository navigation
gateway: repeat bare-hash pulls re-probe the pinned node for a size they already learned #2632
area:clidecdn binary: get, gateway, pool, publish, origin, setuparea:clientdecdn-client SDK: paid pull, lanes, buyer poolkind:featureNew capability or a change to current behavior
Today. A decdn gateway pinned with --node-id pulls a bare blob hash (no manifest size) through fetch_on, which resolves its targets once per request. With no known size, probe_pinned (crates/client/src/targets.rs) sends one cdn/probe/v1 probe to the pinned node for the size hint. Every probe comes from the gateway's one endpoint, so all requests share the node's per-peer probe bucket: 5/s, burst 5 by default (DEFAULT_PROBE_PER_PEER_RATE_PER_SEC, DEFAULT_PROBE_PER_PEER_BURST in crates/common/src/config/mod.rs, per ADR 005 § Probe rate limiting).
Problem. Above about 5 bare-hash pulls per second, the node sheds the extra probes. A shed probe gives no hint, so that pull falls back to the header-only whole-blob open. The node then writes up to a credit window into a stream the gateway drops unread, which is the waste #2619 removed. It also raises the node's decdn_probe_rate_limit_rejected_per_peer_total. Nothing fails: the fallback is the behaviour from before #2619. Bundle entries the gateway serves are not affected; their manifest size is the first claim (ProbeOpts::known_size).
Ask. A blob's size is fixed by its hash. Keep a bounded hash → size map for one gateway run (for example in FetchHost), filled from each pull's first claim or verified size, and pass a hit as known_size so the repeat pull sends no probe. Add a test that a second pull of the same hash sends no probe.
area:clidecdn binary: get, gateway, pool, publish, origin, setuparea:clientdecdn-client SDK: paid pull, lanes, buyer poolkind:featureNew capability or a change to current behavior
Activity
fix(gateway): pull a non-manifest once, reuse verified sizes, count l…