fix(infra): multi-zone L4 placement for model MIG - #5
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adjusts the Terraform configuration for the vLLM regional MIG to place instances across multiple zones in us-central1, mitigating L4 GPU capacity exhaustion in a single zone while keeping the existing MIG + internal LB architecture intact.
Changes:
- Introduces a new
model_zonesvariable to define eligible zones for the model MIG. - Updates the regional MIG to use
distribution_policy_zonesfromvar.model_zonesinstead of a singlevar.zone.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| infra/variables.tf | Adds model_zones variable to control multi-zone placement for the model MIG. |
| infra/model.tf | Switches the regional MIG distribution policy from single-zone to multi-zone. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+16
to
+20
| variable "model_zones" { | ||
| description = "Zones the model MIG may use; spread wide since L4 capacity varies by zone." | ||
| type = list(string) | ||
| default = ["us-central1-a", "us-central1-b", "us-central1-c"] | ||
| } |
| target_size = var.model_replicas | ||
|
|
||
| distribution_policy_zones = [var.zone] | ||
| distribution_policy_zones = var.model_zones |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
us-central1-a had no L4 capacity (ZONE_RESOURCE_POOL_EXHAUSTED). MIG now distributes across a/b/c. Applied: MIG+LB chain recreated, gateway unchanged.