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

Docs about scaling? #577

Open
ysfaran opened this issue Sep 8, 2022 · 2 comments
Open

Docs about scaling? #577

ysfaran opened this issue Sep 8, 2022 · 2 comments

Comments

@ysfaran
Copy link

ysfaran commented Sep 8, 2022

I couldn't find any docs related to scalability of bazel-remote, so I'm trying to get some Infos here.

Generally, is it possible to scale bazel-remote horizontally?
Lets say you start small and there is just one bazel-remote client.
After some time more bazel-remote clients are added (through local development and pipeline runs).
Lets say that there are 20 clients, which might want to access bazel-remote at the same time.

Now bazel-remote gets really slow and is not able to respond in time etc..
Could you in this case just add another bazel-remote, which would point to the same disk (e.g. Amazon EFS), without any issues?
If no, what would be potential issues here? Would these issues be major or minor?

@mostynb
Copy link
Collaborator

mostynb commented Sep 8, 2022

Bazel-remote's cache dir can't be shared between multiple bazel-remote processes running at the same time. If you try to do this, then each instance's disk usage estimate will drift once it hits the cache size limit (maybe not a problem for amazon EFS, but you could run out of disk space on a traditional filesystem), and some clients might get build errors when bazel-remote reports that it has particular cache items available that have been removed by another instance.

It is possible for multiple bazel-remote instances to use the same proxy backend (eg s3 or gcs, or another bazel-remote instance via http). I have used this method to setup office local caches which fall back to checking a central cache. The same idea would also spread load across multiple bazel-remote instances on the same network if you wanted to experiment. But I would recommend just starting with a single cache and seeing if that scales up enough for you.

@raylu
Copy link

raylu commented Jun 13, 2023

it would be really helpful to mention this somewhere in the README

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

3 participants