Reduce Stemcell Distribution Egress Costs via Cloudflare CDN
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- google-cloud
- Área
- cloud, devops, infrastructure
Línea de trabajo
Comienza revisando la migración relacionada en cloudfoundry/community#926 y las referencias de automatización de releases a bosh-io/stemcells-index y a la UI/API de bosh.io. Define el trabajo de infraestructura, mapeo de URL, despliegue gradual y compatibilidad hacia atrás a lo largo de las fases indicadas; se considera terminado cuando se cumplen los criterios de éxito sin romper las URL de GCS existentes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Ruby
- Estrellas
- 52
- Forks
- 124
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 23
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cloudfoundry/bosh-linux-stemcell-builder
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
cloudfoundry/bosh-linux-stemcell-builder#802 ·
Los mantenedores suelen responder en 1 día
-
Pin and verify tools in the OS image stemcell builderPosiblemente ocupada @vighes la tomó hace 3 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
cloudfoundry/bosh-linux-stemcell-builder#806 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
cloudfoundry/bosh-linux-stemcell-builder#803 ·
Los mantenedores suelen responder en 1 día
-
Investigate making cloud-init → BOSH-agent network handoff explicit via service ordering (Azure)Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 30/100
cloudfoundry/bosh-linux-stemcell-builder#791 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
cloudfoundry/bosh-linux-stemcell-builder#738 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de cloudfoundry/bosh-linux-stemcell-builder
Issues similares
-
Bug Ruby
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
getsentry/sentry-ruby#3211 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
internetee/registry#2984 ·
Los mantenedores suelen responder en 6 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
ecosyste-ms/issues#862 ·
Los mantenedores suelen responder en 1 día
-
Redis Lua error `@user_script:52: ERR value is not an integer or out of range` when `window_size` is configuredPosiblemente ocupada @mimosa la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
riscv/riscv-unified-db#2829 ·
Los mantenedores suelen responder en 1 día