Skip to content

Regional cache replication

Network latency has a major impact on remote caching performance, so it's important to keep cached data close to users and systems that need it. For example, a continuous integration system using remote execution or caching is usually collocated with EngFlow cluster for best performance and cost effectiveness. However, developers anywhere in the world could benefit from cached actions run by the continuous integration system. EngFlow's Regional Cache Replication feature copies cached actions across multiple, geographically distributed clusters to make actions cached in one region available quickly and globally.

Regional cache replication designates one cluster as the primary cluster, and the others as replica clusters. Action results cached in the primary cluster are copied to the replica clusters. The replication process is different for Action cache entries and blobs in the content addressable store:

  • Action cache entries are replicated eagerly when they are written to the primary cluster.

  • CAS blobs are only copied into replica clusters if they are requested by clients.

The reason for the behavior difference to make use of Bazel's Build without the Bytes feature. When BWoB is active, a cached build needs to download all the actions it references from the action cache but can avoid downloading most CAS blobs. Therefore, many CAS blobs in the primary cluster will not be needed, and the considerable costs of replicating every CAS blob in the primary cluster to every replica cluster can be avoided by lazy replication. CAS blobs that still must be replicated are cached by the replica cluster, so they are local and fast to access after the first download.

Using regional cache replication requires designating one primary region and any desired replica regions. Contact EngFlow customer success to enable this feature.