Case Study

Envoy Mobile
Envoy Mobile builds up to 10x faster using EngFlow Remote Execution. Open-source contributors get faster presubmits and can share results using EngFlow Build and Test UI.
Envoy Mobile

About Envoy Mobile

The open-source project Envoy is a network proxy that can improve the observability of complex networking setups, as typically present in modern cloud-native applications. This large C++ application is a member of the CNCF, with contributions from 400+ companies and 4k+ individuals.

Envoy Mobile is a subrepo of Envoy that targets mobile development. Its client networking libraries bring the power of Envoy to mobile systems.

With EngFlow Remote Execution, Envoy Mobile maintainers can iterate fast on the entire library regardless of how many OSes, runtimes, or languages our commits change. In truth, CI is now so performant that I prefer to iterate by pushing to it, rather than wait for my machine’s local builds!
Jose Nino
Staff Engineer @ Lyft, Envoy & Envoy Mobile maintainer

Mobile builds and tests bring their own set of challenges:

  • They need to target several operating systems (e.g. Android, iOS),
  • may be bound to certain host operating systems (e.g. iOS apps need to build on MacOS), and
  • use a variety of programming languages (Java/Kotlin, C++, Python, ObjC, Swift).

This heterogeneity led to particularly slow builds and tests and made Envoy Mobile the perfect candidate to migrate to EngFlow Remote Execution.

6x

From 2 hours down to 20 minutes

Migrating to remote execution

Migrating a Bazel project to remote execution can be a daunting task. For instance, a Bazel user may be tempted to:

  • mark a Bazel rule in a BUILD file as local in order to escape Bazel’s sandboxing,
  • use custom scripts (e.g github.com/actions/setup-java) to set up locally installed tools via hard-coded paths instead of using Bazel toolchains,
  • blindly rely on Bazel’s capacity to detect local tools (e.g. by not declaring dependencies in BUILD files),
  • rely on certain Bazel features that may not work remotely (e.g. coverage may break),
  • rely on local tools that are not available on the docker image running the action (e.g. thread sanitization may need special docker capabilities, missing header files),
  • and more.

These are common issues that tend to require a certain level of Bazel expertise to overcome. EngFlow can advise with this migration, or take care of it completely.

We looked for a distributed build solution for Envoy Mobile and found EngFlow. We’re now enjoying 10x better performance. It’s been amazing to work with EngFlow. They are the world experts in Bazel and we’re looking forward to further increasing our build speeds, both across Envoy Mobile and Envoy with them.
Matt Klein
Principal Software Engineer @ Lyft, creator of Envoy Proxy

6x faster builds and tests with EngFlow

EngFlow’s Bazel experts migrated Envoy Mobile’s presubmit flows to remote execution and manage an EngFlow Remote Execution cluster for them. The overall build and test time is now ~20 minutes, compared to ~2 hours before. This speed-up of ~6x has led to a much faster turnaround time of their open-source contributions.

The table below contains a detailed breakdown of the migration’s pull requests, as well as the achieved speed-ups based on the programming language of the source code, the host OS (the OS of the machine running Bazel), and the target OS (the OS of the machine running the final artifacts).

Pull requestsSpeed-upLanguageHost OSTarget OS
#16974xObjC / SwiftMacOSiOS
#169710xC++LinuxLinux
#1705, #1821, #18385–10xJava / KotlinMacOSAndroid
#17073xC++MacOSMacOS
#1745, #17815xC++ (ASAN/TSAN)LinuxLinux
#175310xPythonLinuxLinux
#17576xC++ (LLVM coverage)LinuxLinux
#17592xKotlinMacOSMacOS
#180110xJava / KotlinLinuxAndroid

Sharing build and test results

Additionally, EngFlow Build and Test UI allows contributors to share their build and test results and drill down on them.

Quick tip

To access the Build and Test UI for a specific run: go to Actions, click on the run you are interested in, find a job’s build or run step, and click on the EngFlow Build and Test UI link. Alternatively, go to the Invocation Search page and select the invocation you are interested in.
Screenshot showing the EngFlow Build and Test UI

10x better performance

With EngFlow Remote Execution and Build and Test UI, CI runs are faster and contributors have better insight into build and test results. Open-source contributions can be reviewed and merged more quickly and easily, which is great for developers — and everyone who is using software that includes Envoy Mobile.
video thumbnail
button to start playing YouTube video
Click to play
Consent to YouTube's privacy policy to load this video.

Faster builds & tests for you

Learn more about how you can optimize your builds and tests and make your engineers more productive and happy.