8000 Add template cache proxy to improve speed of new template starts by ValentaTomas · Pull Request #635 · e2b-dev/infra · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

ValentaTomas
Copy link
Member
@ValentaTomas ValentaTomas commented May 10, 2025

Description

  • enable anywhere cache for cloud storage
  • use two separate GCP clients for proxied and non-proxied Object reads
  • robust fallback from proxied to non-proxied reads
  • use private google access to speed up requests to cloud storage?

@ValentaTomas ValentaTomas self-assigned this May 10, 2025
@ValentaTomas ValentaTomas added improvement Improvement for current functionality feature New feature labels May 10, 2025
@0div 0div self-assigned this May 30, 2025
@0div 0div marked this pull request as ready for review June 6, 2025 18:16
@0div 0div requested review from jakubno and dobrac as code owners June 6, 2025 18:16
Copy link
Contributor
@dobrac dobrac left a 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
Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Contributor

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)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. yes it will fallback to regular cloud storage read calls if Anywhere Cache not in the same zone as client, also we
  2. 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/",
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature improvement Improvement for current functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0