How Google migrated billions of lines of code from Perforce to Piper
Blog post from Graphite
In 2011, Google faced the challenge of scaling its source control system, which relied on a single Perforce server that had been in use for over a decade, supporting thousands of users and millions of commands daily. Despite the server's remarkable performance, it was stretched thin, prompting Google engineers to explore alternatives. The decision to maintain a monolithic repository was significant, as it set industry standards for handling code complexity at scale. After rejecting alternatives like SVN due to migration issues, Google developed Piper, a distributed system built on Google infrastructure like Bigtable, to replace Perforce. This migration, which took over four years, was complicated by dependencies on the Perforce API, leading to a clean room design approach to avoid legal risks. The transition to Piper was critical, as it was an all-or-nothing move, requiring complete migration before Google could benefit from the new system. The successful cutover in 2012 reduced Google's operational risk and enabled new systems, highlighting a period of innovative and daring engineering at Google.