Skip to content
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

Configure http proxy uploaders #351

Open
ulrfa opened this issue Sep 22, 2020 · 2 comments
Open

Configure http proxy uploaders #351

ulrfa opened this issue Sep 22, 2020 · 2 comments

Comments

@ulrfa
Copy link
Contributor

ulrfa commented Sep 22, 2020

Allow configuring the constants in httpproxy.go, from configuration file:

const numUploaders = 100
const maxQueuedUploads = 1000000

And specifically allow numUploaders to be set to 0. That would mean that bazel-remote will try fetching from parent cache, but never uploading anything to parent cache.

Optionally also allow disabling forwarding of HEAD requests via proxy.

Use cases:

  • Set to zero if the local bazel-remote instance mostly contains artifacts irrelevant for the parent cache. But there is chance of cache hits in other direction.

  • Set to zero if the executor using the local bazel-remote instance is not trusted enough to populate a central shared cache.

  • Set to zero if the remote execution input files uploaded to a specific remote execution cache instance, should not be distributed futher to also central cache instance. But if the remote executor should still get build result cache hits from central cache. (For this use case it could also make sense to disable forwarding of HEAD requests, and only forward GET requests).

  • Reduce number of uploaders based on what a parent central cache could handle, to avoid overload conditions. (Not sure if it would work i practice or if a single uploader would still consume almost as much resources)

@mostynb
Copy link
Collaborator

mostynb commented Sep 22, 2020

Making these configurable sounds reasonable. (The other proxy backends have the same settings, it would be good if these could use the same configuration setting instead of duplicating configuration options.)

I'm not so sure about disabling HEAD requests, unless we also disable GET requests. What's the intended use case for this?

Making these modifiable without restarting bazel-remote might be too complex.

@ulrfa
Copy link
Contributor Author

ulrfa commented Sep 23, 2020

Thanks Mostyn,

Use case for forwarding GET but not HEAD: If there is a separate cache instance for a remote execution cluster, that should fetch build results also from another central cache instances, but the input files (e.g. .c and .h files) uploaded to the remote execution cache, should not be uploaded to the other central cache instance. The FindMissingBlobs requests from bazel client then results in huge amount of HEAD requests that would be unnecessary to forward via the proxy.

I'm not working on a pull request for this now, instead I'm focusing on #350

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants