Reduce Stemcell Distribution Egress Costs via Cloudflare CDN
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
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- google-cloud
- Lĩnh vực
- cloud, devops, infrastructure
Hướng nghiên cứu
Bắt đầu bằng việc xem xét quá trình migration liên quan trong cloudfoundry/community#926 và các tham chiếu đến tự động hóa release cho bosh-io/stemcells-index và UI/API của bosh.io. Xác định công việc về infrastructure, ánh xạ URL, rollout và khả năng tương thích ngược trong các phase được liệt kê; được xem là hoàn tất khi các tiêu chí thành công được đáp ứng mà không làm hỏng các URL GCS hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Stemcell downloads from https://storage.googleapis.com/bosh-aws-light-stemcells/...
(and equivalent GCS buckets for other IaaS) generate significant GCP egress costs (~2K $ per month).
We can drastically reduce these costs by fronting the GCS buckets with Cloudflare CDN under a community-owned domain such as stemcells.cloudfoundry.org.
Related migration: cloudfoundry/community#926
Motivation
- Stemcells are immutable, versioned, large artifacts — ideal CDN cache candidates.
- Current GCS egress is billed at ~$0.12/GB; Cloudflare egress to end users is free.
- A single cached version is fetched from origin once, then served from edge globally.
- Improves download speed and reliability for the community.
Proposed Architecture
User → https://stemcells.cloudfoundry.org/<iaas>/<version>/<file>.tgz
│
└── Cloudflare CDN (cached at edge)
│ (cache miss only)
└── storage.googleapis.com/bosh-<iaas>-light-stemcells/...
Example URL mapping:
- Before:
https://storage.googleapis.com/bosh-aws-light-stemcells/1.425/light-bosh-stemcell-1.425-aws-xen-hvm-ubuntu-noble.tgz - After:
https://stemcells.cloudfoundry.org/aws/1.425/light-bosh-stemcell-1.425-aws-xen-hvm-ubuntu-noble.tgz
Action Items
Phase 1 — Infrastructure setup
- Create Cloudflare zone (or subdomain delegation) for
stemcells.cloudfoundry.org - Verify stemcell file sizes vs Cloudflare cache limits (Free 512MB / Pro 1GB / Business 5GB / Enterprise unlimited with Cache Reserve)
- Decide Cloudflare plan (or apply for Cloudflare's open-source / OSS sponsorship program)
- Ensure GCS buckets (
bosh-aws-light-stemcells,bosh-gce-light-stemcells,bosh-azure-light-stemcells, etc.) haveallUsers:objectViewer
Phase 2 — Cloudflare configuration
- Add CNAME
stemcells.cloudfoundry.org → storage.googleapis.com(proxied) - Add Origin Rule: override
Hostheader tostorage.googleapis.com - Add URL Rewrite rule mapping
/<iaas>/<path>→/bosh-<iaas>-light-stemcells/<path> - Configure Cache Rule: Edge TTL = 1 month, Browser TTL = 1 day, cache eligible
- Enable Tiered Cache for better hit ratio
- (Optional) Enable Cache Reserve for large objects
Phase 3 — Release automation integration
- Update stemcell publishing pipeline (bosh-io / stemcells-index and equivalents) to:
- Continue uploading to GCS as origin of truth
- Issue a
curl -Iwarm-up request after upload to pre-fill Cloudflare cache - Publish CDN URL (
stemcells.cloudfoundry.org/...) in release metadata /bosh.ioindex
- Update
bosh.ioUI/API to point downloads at CDN URL - Keep GCS URLs functional for backward compatibility (no breaking change)
Phase 4 — Monitoring & rollout
- Add Cloudflare Analytics dashboard (cache hit ratio, bandwidth saved)
- Compare GCP egress bill before/after (1 month baseline)
- Document new URL pattern in BOSH / stemcell docs
- Announce on cloudfoundry-dev mailing list & Slack
#bosh
Phase 5 — Optional follow-up
- Evaluate full migration of origin to Cloudflare R2 (zero egress, no large-file cache limits) if cost savings justify operational change
Success Criteria
- >90% cache hit ratio after warm-up
- Measurable reduction in GCP egress costs (target: >70%)
- No regressions in stemcell download reliability
- Zero breakage for existing consumers using old GCS URLs
- Ngôn ngữ chính
- Ruby
- Star
- 52
- Fork
- 124
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 23
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cloudfoundry/bosh-linux-stemcell-builder
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
cloudfoundry/bosh-linux-stemcell-builder#802 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Pin and verify tools in the OS image stemcell builderCó thể đã có người làm @vighes đã nhận 3 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
cloudfoundry/bosh-linux-stemcell-builder#806 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
cloudfoundry/bosh-linux-stemcell-builder#803 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Investigate making cloud-init → BOSH-agent network handoff explicit via service ordering (Azure)Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
cloudfoundry/bosh-linux-stemcell-builder#791 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
cloudfoundry/bosh-linux-stemcell-builder#738 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của cloudfoundry/bosh-linux-stemcell-builder
Issue tương tự
-
Bug Ruby
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
getsentry/sentry-ruby#3211 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
internetee/registry#2984 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
interest-zsv
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
hitobito/hitobito_zsv#6 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ecosyste-ms/issues#862 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Redis Lua error `@user_script:52: ERR value is not an integer or out of range` when `window_size` is configuredCó thể đã có người làm @mimosa đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày