r/bazel • u/cachely-admin • Jul 12 '26
We built a managed Bazel remote cache with cache analytics - looking for feedback
Affiliation disclosure: We’re building Cachely.
We’ve added Bazel support to Cachely, a managed remote build cache focused not only on storing artifacts, but also on helping teams understand whether remote caching is actually effective.
We kept the integration compatible with Bazel’s existing remote-cache configuration, so it does not require replacing the build system or CI platform.
The questions we’re trying to help teams answer include:
- Which actions repeatedly miss the remote cache?
- What cache-hit rate are we getting across CI and developer machines?
- How much build time and compute are we actually avoiding?
- Are some artifacts taking longer to download than to rebuild?
- How much data are we storing and transferring?
We’re particularly interested in feedback from Bazel users operating remote caching today:
- What are you currently using?
- What is hardest to observe or debug?
- Which metrics would actually help you improve cache effectiveness?
- Would a managed HTTP cache be useful, or do Bazel teams generally require full REAPI and remote execution?
Cachely: https://cachely.dev
We’d appreciate direct technical criticism, especially around protocol expectations, authentication, observability, and what Bazel users would consider production-ready.
2
u/jakeherringbone Jul 13 '26
There's an area ripe for exploration:
Linux package managers like APT ship pre-compiled binaries, built by a (hopefully) trusted third-party. Similarly homebrew/workbrew have "bottles" which are pre-built binaries, to avoid MacOS clients having to build their own.
In Bazel, we similarly build a lot of the same binaries, but each cache has to independently populate them. As a result we end up with one-off projects like https://github.com/hermeticbuild/bsdtar-prebuilt whose job is simply a GitHub Actions automation to build the binary with Bazel, effectively "priming" everyone's CAS to speed up that first-time user experience and avoid cache misses for that binary.
For customers willing to accept your supply-chain security guarantee, you could allow "global" cache hits across customers. There's some research required to figure out what cache key to use however - probably there is some obscure flag with slightly different value that causes two customers to never compute identical keys.
1
u/dacian88 Jul 12 '26
Do you have any concrete benchmarks for the AC lookup performance? Like let's say for a trivially small action lookup. Action cache latency is fairly critical for fast builds in high cache hit rate scenarios, actions tend to be smaller objects and they all need to be fetched, and with the default behavior of --remote_download_outputs CAS objects typically don't get downloaded
Generally lack of gRPC support here is also not great, Bazel's http remote cache protocol does not support HTTP/2.
1
u/jakeherringbone Jul 13 '26
In addition to the Action Cache and Content Addressable Store, I'd suggest you also aggressively solicit (Bazel) clients to upload their "compact execution log". This will inform you *why* there was a cache miss.
If you also have simple metadata about the git history (no file content needed) you can compare with "before your code changes".
These give the biggest value for repair
1
u/[deleted] Jul 18 '26
Why would I use this over buchgr/bazel-remote for small simple use cases, or buildbarn or buildbuddy for more complete RBE solutions?