-
Notifications
You must be signed in to change notification settings - Fork 106
Add template cache proxy to improve speed of new template starts #635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please also measure some of the improvements?
|
||
resource "google_storage_anywhere_cache" "cache" { | ||
bucket = google_storage_bucket.fc_template_bucket.name | ||
zone = var.gcp_zone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will the zone work, as we are moving to the regional instance groups, when the instances will be in a different zone?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't know we were moving to regional instance groups, not ideal but https://cloud.google.com/compute/docs/instance-groups/regional-migs#selectingzones. Or else pull the plug all together on the aptly named Anywhere Cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean that we would specify all zones manually? I was thinking there could be:
1) Either it doesn't matter it's in a different zone, it would function fine
2) We could deploy it to all zones (not sure how expensive it is)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- yes it will fallback to regular cloud storage read calls if Anywhere Cache not in the same zone as client, also we
- that's a total of
us-west1-{a,b,c}
and per doc:
Read operations served from Anywhere Cache are priced lower than Class B operations served from a bucket in Standard storage.
network_mode = "host" | ||
ports = ["template-cache", "status"] | ||
volumes = [ | ||
"local:/etc/nginx/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would make sense to mount additional drive to the API instance for this cache purpose
Description