# Remote and Distributed Build Patterns

DevFeed: [Remote and Distributed Build Patterns](<https://devfeed.tech/articles/remote-and-distributed-build-patterns-24685.md>)

Original publisher: [Read original article](<https://blog.gradle.org/remote-and-distributed-build-patterns>)

Author: Kyle Moore

Published: 2022-07-12T06:00:00Z

Content type: article

Language: en

Sources: [The Gradle Blog](<https://devfeed.tech/sources/the-gradle-blog.md>)

Topics: [Gradle](<https://devfeed.tech/topics/gradle.md>), [build performance](<https://devfeed.tech/topics/build-performance.md>), [Caching](<https://devfeed.tech/topics/caching.md>), [build times](<https://devfeed.tech/topics/build-times.md>), [ci](<https://devfeed.tech/topics/ci.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [Cloud](<https://devfeed.tech/topics/cloud.md>)

Tags: [build](<https://devfeed.tech/tags/build.md>), [build-times](<https://devfeed.tech/tags/build-times.md>), [build-tool](<https://devfeed.tech/tags/build-tool.md>), [cache](<https://devfeed.tech/tags/cache.md>), [ci](<https://devfeed.tech/tags/ci.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [incremental](<https://devfeed.tech/tags/incremental.md>), [optimization](<https://devfeed.tech/tags/optimization.md>)

## AI overview

This Gradle post explains remote and distributed build patterns, clarifies their terminology, and describes how remote build caches reuse previous execution results to reduce local and CI build times.

## Source excerpt

A frequently-requested feature for the Gradle Build Tool is the ability to perform remote or distributed builds. But what exactly does this mean? And what are the motivations behind the requests? This post will explore the difference between remote vs. distributed builds and their variations. As there is no industry-wide agreement on consistent terminology for these concepts, the goal of this post is to give an overview of these patterns and how they relate to each other. Except for two JVM-specific references, these observations are generally applicable to software projects using any language or ecosystem. But Why? These features are typically discussed in the context of shortening build times on local developer machines. Extended build turnaround times hinder productivity in both local and CI environments, but the local build experience has a disproportionate effect on developer sentiment. Terminology The terms "remote" and "distributed" builds are not always used consistently in the industry and are often used interchangeably. Below, we'll give each a distinct definition. Firstly, we'll also define the more fundamental "build cache" optimization. What is a Remote Build Cache? The first pattern that includes a remote component that we'll discuss is the build cache. Similar to incremental builds, the build cache avoids execution of CPU-intensive operations like compiling source files or executing tests. While an incremental build leaves the outputs of the most recent local operation in-place on disk, a build cache does this by storing and reusing the results of any previous execution of the operation - much like restoring files from a backup. More importantly, the cache can be local-only, or shared amongst engineers (remote build cache). The CI environment is typically configured to write to a shared cache in the cloud. Each engineer's machine then pulls results from the shared cache. This means that the same sources need only be built once on a CI host avoiding ex