feat(infra): Preliminary Report: Migrate Classic Application Load Balancers to Global External ALBs
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 28/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- gcp, google-cloud, terraform
- Ambito
- cloud, devops, infrastructure
Direzione di ricerca
Inizia leggendo infra/frontend/service.tf e infra/backend/service.tf, quindi verifica i servizi backend di staging e le regole di forwarding elencati usando i comandi gcloud describe forniti. Segui le fasi di migrazione di staging documentate prima della produzione, monitora il conteggio delle richieste e le risposte 5xx in Cloud Monitoring e termina impostando gli schemi Terraform e confermando l’assenza di drift con terraform plan nel DevContainer.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Important: This is a preliminary report outlining the roadmap to migrate our existing Classic Application Load Balancers (ALBs) to modern Global External Application Load Balancers (
EXTERNAL_MANAGED). With the adoption of Google Provider v8.0.0 in #2807, our load balancers remain on Classic ALB (load_balancing_scheme = "EXTERNAL"). This issue tracks the planned, staged migration toEXTERNAL_MANAGED. An engineer should verify these findings and steps against the live GCP infrastructure before executing any production changes. Useful verification tips and commands are provided at the end of this issue.
Overview
In hashicorp/google provider 8.0.0, the default load_balancing_scheme was changed to EXTERNAL_MANAGED (Envoy-based Global External ALB). To avoid disruptive API errors and maintain stability, #2807 explicitly pinned existing load balancers to load_balancing_scheme = "EXTERNAL".
This issue tracks the follow-up project: migrating our frontend and backend load balancers from Classic ALB (EXTERNAL) to Global External ALB (EXTERNAL_MANAGED).
Because Google Cloud disallows changing the load balancing scheme directly in place on active infrastructure via Terraform, this requires an orchestrated, multi-step migration using GCP's migration state machine.
Resources Subject to Migration
The following 6 load balancing resources will be migrated across both environments:
Staging Environment (webstatus-dev-public-staging)
- Backend Services (2):
staging-frontend-service(infra/frontend/service.tf:L148)staging-backend-service(infra/backend/service.tf:L342)
- Global Forwarding Rules (4):
staging-frontend-https-rule(infra/frontend/service.tf:L183)staging-frontend-main-https-rule(infra/frontend/service.tf:L197)staging-backend-https-rule(infra/backend/service.tf:L377)staging-backend-main-https-rule(infra/backend/service.tf:L391)
Production Environment (webstatus-dev-public-prod)
- Backend Services (2):
prod-frontend-serviceprod-backend-service
- Global Forwarding Rules (4):
prod-frontend-https-ruleprod-frontend-main-https-ruleprod-backend-https-ruleprod-backend-main-https-rule
Step-by-Step Migration Procedure
Execute on Staging first (PROJECT=webstatus-dev-public-staging, ENV=staging), observe for at least one full release cycle, then execute on Production (PROJECT=webstatus-dev-public-prod, ENV=prod).
Phase 1: Migrate Backend Services
Note: In GCP, every backend service attached to a forwarding rule must be migrated to
EXTERNAL_MANAGEDbefore migrating any forwarding rules.
-
Set Migration State to
PREPARE:
Prepares Envoy proxy infrastructure alongside existing GFEs.gcloud compute backend-services update ${ENV}-frontend-service \ --project=${PROJECT} --global --external-managed-migration-state=PREPARE gcloud compute backend-services update ${ENV}-backend-service \ --project=${PROJECT} --global --external-managed-migration-state=PREPAREWait at least 6 minutes for Google edge infrastructure propagation. Verify state reports "Prepared for test".
-
Canary Test via
TEST_BY_PERCENTAGE(Recommended for Prod):
Routes a canary percentage through the modern Envoy data plane.gcloud compute backend-services update ${ENV}-frontend-service \ --project=${PROJECT} --global --external-managed-migration-state=TEST_BY_PERCENTAGE \ --external-managed-migration-testing-percentage=10 gcloud compute backend-services update ${ENV}-backend-service \ --project=${PROJECT} --global --external-managed-migration-state=TEST_BY_PERCENTAGE \ --external-managed-migration-testing-percentage=10Wait at least 6 minutes. Monitor error rates, latencies, and proxy logs.
-
Transition to
TEST_ALL_TRAFFIC:
Routes 100% of traffic to the Envoy-based ALB infrastructure.gcloud compute backend-services update ${ENV}-frontend-service \ --project=${PROJECT} --global --external-managed-migration-state=TEST_ALL_TRAFFIC gcloud compute backend-services update ${ENV}-backend-service \ --project=${PROJECT} --global --external-managed-migration-state=TEST_ALL_TRAFFICWait at least 6 minutes. Verify health checks and traffic stability.
-
Finalize Backend Services to
EXTERNAL_MANAGED:gcloud compute backend-services update ${ENV}-frontend-service \ --project=${PROJECT} --global --load-balancing-scheme=EXTERNAL_MANAGED gcloud compute backend-services update ${ENV}-backend-service \ --project=${PROJECT} --global --load-balancing-scheme=EXTERNAL_MANAGEDWait at least 6 minutes.
Phase 2: Migrate Forwarding Rules
Once backend services are EXTERNAL_MANAGED:
gcloud compute forwarding-rules update ${ENV}-frontend-https-rule \
--project=${PROJECT} --global --load-balancing-scheme=EXTERNAL_MANAGED
gcloud compute forwarding-rules update ${ENV}-frontend-main-https-rule \
--project=${PROJECT} --global --load-balancing-scheme=EXTERNAL_MANAGED
gcloud compute forwarding-rules update ${ENV}-backend-https-rule \
--project=${PROJECT} --global --load-balancing-scheme=EXTERNAL_MANAGED
gcloud compute forwarding-rules update ${ENV}-backend-main-https-rule \
--project=${PROJECT} --global --load-balancing-scheme=EXTERNAL_MANAGED
Wait at least 6 minutes.
Phase 3: Rollback Procedure (Safety Mechanism)
GCP maintains a 90-day rollback window:
- Revert forwarding rules first:
gcloud compute forwarding-rules update <RULE> --project=${PROJECT} --global --load-balancing-scheme=EXTERNAL - Transition backend services back to
TEST_ALL_TRAFFIC, wait 6 minutes, then set--load-balancing-scheme=EXTERNAL.
Phase 4: Terraform Code Synchronization
After both environments are migrated:
- Update
infra/frontend/service.tfandinfra/backend/service.tfto setload_balancing_scheme = "EXTERNAL_MANAGED"(or remove the explicit setting since it is the default in provider v8). - Run
terraform planinside the DevContainer; verify zero infrastructure drift.
Tips for Verification & Next Steps
- Check Live Schemes via
gcloud:gcloud compute backend-services describe staging-backend-service --project=webstatus-dev-public-staging --global --format="value(loadBalancingScheme)" gcloud compute forwarding-rules describe staging-backend-https-rule --project=webstatus-dev-public-staging --global --format="value(loadBalancingScheme)" - Monitor HTTP Edge Metrics in Cloud Monitoring:
DuringTEST_BY_PERCENTAGEandTEST_ALL_TRAFFIC, monitor Cloud Monitoring metricloadbalancing.googleapis.com/https/request_countgrouped byresponse_code_classto verify zero unexpected 5xx responses. - Reference Documentation:
- Lingua principale
- Go
- Stelle
- 257
- Fork
- 61
- Merge medio
- 1g 3h
- PR unite (30g)
- 39
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di GoogleChrome/webstatus.dev
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
GoogleChrome/webstatus.dev#2815 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
GoogleChrome/webstatus.dev#2814 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
GoogleChrome/webstatus.dev#2671 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
GoogleChrome/webstatus.dev#2555 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
GoogleChrome/webstatus.dev#2554 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di GoogleChrome/webstatus.dev
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TUM-Dev/Campus-Backend#678 ·
I maintainer di solito rispondono entro 1 giorno
-
fix(app): fail closed if GetGeneralSetting fails during initializationForse già presa @kalavt l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
tsukumogami/tsuku#2813 ·
I maintainer di solito rispondono entro 1 giorno
-
component:obi contribfest go test
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 83/100
open-telemetry/opentelemetry-ebpf-instrumentation#4143 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno