Rustup Pull-Through Cache

Đang mở
#4,527 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
cli, networking

Hướng nghiên cứu

Issue không nêu tệp hay bài kiểm thử nào; hãy bắt đầu bằng cách xem xét entry point của rustup CLI cho lệnh proxy serve được đề xuất và đường dẫn tải xuống khi cài đặt. Để hoàn thành, cần có một pull-through cache cùng với một biến môi trường hoặc cờ CLI để hướng các trình cài đặt đến đó, bao quát cả nội dung đã được lưu trong cache và nội dung mới.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement
Problem you are trying to solve

The Internet seems to be decomposing and Open Source project download channels are collapsing in the process. Rustup is not immune unfortunately and we're seeing a significant increase in CI failures and hearing from devs across various client environments which rely on rustup mostly due to:

error: failed to download file error=Reqwest(reqwest::Error { kind: Request, url: "https://static.rust-lang.org/dist/2025-06-26/rustc-1.88.0-x86_64-unknown-linux-gnu.tar.xz", source: TimedOut })
info: retrying download for 'https://static.rust-lang.org/dist/2025-06-26/rustc-1.88.0-x86_64-unknown-linux-gnu.tar.xz'
error: failed to download file error=Reqwest(reqwest::Error { kind: Request, url: "https://static.rust-lang.org/dist/2025-06-26/rustc-1.88.0-x86_64-unknown-linux-gnu.tar.xz", source: TimedOut })
info: retrying download for 'https://static.rust-lang.org/dist/2025-06-26/rustc-1.88.0-x86_64-unknown-linux-gnu.tar.xz'
error: failed to download file error=Reqwest(reqwest::Error { kind: Request, url: "https://static.rust-lang.org/dist/2025-06-26/rustc-1.88.0-x86_64-unknown-linux-gnu.tar.xz", source: TimedOut })
info: retrying download for 'https://static.rust-lang.org/dist/2025-06-26/rustc-1.88.0-x86_64-unknown-linux-gnu.tar.xz'
error: failed to download file error=Reqwest(reqwest::Error { kind: Request, url: "https://static.rust-lang.org/dist/2025-06-26/rustc-1.88.0-x86_64-unknown-linux-gnu.tar.xz", source: TimedOut }

Not sure if upstream has rate limiting or if intermediate providers are unhappy with the IO patterns and blocking folks (we're seeing this at various sites in the US and EU).

Solution you'd like

Proposing a rustup proxy serve command which would allow an instance of the binary to serve as a caching proxy for other instances and use of an env var or cli flag to direct instances of rustup performing the installation to get service from the proxy forcing a pull-through on new content and pull-back for cached content.

Should help reduce the load on public servers considerably if CIs were to leverage an innate function for the binary for this instead of having to wire up their own solutions (or just not bother and maul public servers with bandwidth consuming requests).

Notes

For some context: we're a security outfit (predating Rust's existence), manage risk for organizations far larger than the original parent co.

Consolidation of infrastructure carries risk profiles to the ecosystem to include

  1. being blocked by regimes and providers
  2. targeted for "lawful takeover" by hostile entities to use your resource platform against their adversaries
  3. scaled down by intermediate parties (QoS) and MiTMd
  4. provide centralized points for denial of service attacks
  5. the fun stuff we're seeing over at RubyGems which smells a bit like the fall of freenode but likely bad for the Ruby community in any case.

Enabling users of the ecosystem to be the ecosystem diffuses the risk profile and decentralizes some of cost borne by the organization hosting all of these downloads. Natively supported cache tiering and third-party mirroring, P2P distribution, and the attestation + validation mechanisms which are required to ensure safety of such approaches would cost less than the bandwidth and DoS protection budget today and far less than the PR nightmare of cleaning up any of the concerns listed above (unless the entity is owned by NK through a proxy shell co at that point) will cost when they hit the fan.

Ngôn ngữ chính
Rust
Star
7.1k
Fork
1.1k
Merge trung bình
16 giờ 36 phút
Pull request đã merge (30 ngày)
54

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của rust-lang/rustup

Tất cả issue của rust-lang/rustup

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.