Building a crash-free, top-quality app for millions of users worldwide
Reddit is one of the world’s largest social news, content rating, and discussion websites. Every day, millions of people around the world post, vote, and comment in communities organized around their interests.
As of June 2022, Reddit ranked as the 8th most visited site in the world and 7th most-visited in the United States, with over 50 million daily active users — mostly from mobile devices. The mobile team has a standard setup with 80 developers working on iOS and 80 on the Android app, building in native Swift and Kotlin.
Building and maintaining a high-quality app for millions of users
“When an app is used by millions of people every day, you cannot afford crashes.” — Matt Robinson, iOS Engineer at Reddit
A thorough QA process is essential to maintain the highest level of quality and the developers’ confidence in their releases. Speed is crucial, too: if any part of the process slows down or the developers have to wait for pull request checks, they experience huge delays in their progress.
The team strives to reduce the time it takes to merge a change. This involves everything from the time it takes to get a change code reviewed to time it takes to get feedback from the CI checks. They want it to be fast enough that engineers don't feel blocked by the checks that need to run for a change to be considered safe.
Optimizing iOS builds for Apple silicon on M1 machines
Reddit was among the first teams to start running their iOS CI/CD builds on Bitrise’s M1 machines, the world’s first scalable, fully virtualized environment for Apple silicon, with native Xcode support.
Unifying the architectures between CI — now M1 — and engineer computers — generally M1 — allowed the caches to be easily populated by CI to access locally. Thanks to being able to do everything in the same architecture, they managed to streamline caching and many of their testing processes.
As Matt Robinson, iOS Engineer at Reddit explains:
“Having the M1 machine in the Bitrise environment is essential for us to do things reliably, run as many tests as we want, and do so efficiently. The M1 machines make our environment similar to what the engineers already know, which helps us keep the quality high.”
Fully automated releases & a dramatic increase in build performance
The simplified infrastructure — and not having to do duplicate work — resulted in a dramatic increase in their build performance. After switching over to M1 machines, the team saw a 45-50% decrease in their build times.
By now, the mobile team has a fully automated release process with weekly scheduled staged releases. To maintain their speed and stability, they also use Bitrise’s Build Insights for high-level tracking and analytics. Having access to up-to-date information about how each part of the app affects their performance allows them better understand their build statistics, send out alerts easily in case anything goes wrong, see what they can improve, and take the steps to optimize their pipeline. Thanks to combining Bitrise Insights with their own, internal tool they can see all of this from a single dashboard.
“The easier a tool is to leverage, the easier the developers' job is. We can integrate it with different platforms and use it in a variety of ways. It just works.” — Matt Robinson, iOS Engineer at Reddit