Skip to content

gateway: repeat bare-hash pulls re-probe the pinned node for a size they already learned #2632

Closed

Description

@thiras

Follow-up to #2619.

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.

🤖 Generated with Claude Code

Activity

  1. added
    kind:feature
    on Oct 26, 2026
  2. self-assigned this
    on Oct 26, 2026
  3. added
    area:cli
    area:client
    on Oct 26, 2026
  4. assigned and unassigned on Oct 26, 2026
  5. moved this from Backlog to In progress in deCDNon Oct 27, 2026
  6. moved this from In progress to Done in deCDNon Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:cliarea:clientkind:feature

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions