GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
★ Read firstarXiv

Software Engineering at Google

One repository, 2 billion lines, 40,000 commits a day, nearly all at head. A Google engineer catalogs what makes it work: hermetic builds, mandatory review, green trunks, canaries, post-mortems.

Breakdown by FDE Interviews · 11 min read · Updated

About the original · 2017
AUTHORS
Henderson
FROM
Google
PUBLISHED
Feb 2017 · arXiv
CITED BY
50Semantic Scholar · Nov 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 25% of this breakdown.

01

The paper in one minute

Fergus Henderson, a Google engineer since the mid-2000s and one of the original developers of its build tool, wrote this paper to describe how software is built at Google. It is a catalog, not a study: each section describes a practice and why it helps, drawing on his experience and on public sources such as the Site Reliability Engineering book.

Most code lives in one repository visible to every engineer. As of January 2015 it held 2 billion lines in 9 million source files, with 40,000 commits per working day. Almost everyone works at head rather than on long-lived branches. Every directory has at least two owners, and any change needs review by one of them plus a second engineer certified for "readability" in that language. Tests run before commit (presubmit) and continuously after; a rotating "build cop" keeps head green, and status lights make breakage visible.

The build system, Blaze (Bazel, in the references, is its open-source counterpart), builds from declarative BUILD files, distributes work across thousands of machines, and requires every step to be hermetic and deterministic, so results can be cached and shared between engineers. Five main languages are encouraged, with style guides, and services talk through Protocol Buffers.

Releases are frequent and automated: branch from the last green build, test, stage with mirrored production traffic, roll to canary servers, then out gradually. User-visible launches need approvals for legal, privacy, security and reliability. Outages get blameless post-mortems with action items. Most software is rewritten every few years. On the people side: 20% time for self-chosen projects, quarterly OKRs scored from 0 to 1 with a target average of 0.65, separate career ladders for engineers and managers, and peer-reviewed performance evaluation. The author admits that how projects get approved or cancelled is unclear even to him.

THE IDEA, VISUALLY
ONE CHANGE, FROM EDIT TO PRODUCTION small change at head one repository, no long branches presubmit checks tests chosen per subtree code review owner + readability approval commit; tests at head build cop keeps it green release branch cut from the last green build staging mirrored production traffic canary, then gradual rollout over days for critical services Around it: launch approvals (legal, privacy, security, reliability) blameless post-mortems rewrites every few years arXiv 1702.01715 v3, Google HERMETIC BUILD, SHARED CACHE (OUR SIMULATION) clean build 3,000 after editing 3 files 4 second engineer, same change 0 one cached result lost, deterministic 1 one cached result lost, timestamped 1,993 actions run, log scale; 3,000 targets Every action is keyed by a hash of its inputs, so the cache can be shared safely. One non-deterministic output changes every downstream key: Google scrubbed timestamps from generated files for this reason. Paper's numbers: 86 TB, 2 billion lines, 40,000 commits per working day (January 2015).
Left: the path of one change as the paper describes it, from a small edit at head through presubmit tests, review, release branch, staging, canary and gradual rollout. Right: our simulation of a hermetic build with a shared, content-addressed cache, including what one non-deterministic output does to it.
Research notes: the problem, approach and results
40,000

commits per working day to the main repository as of January 2015, nearly all at head rather than on branches (Section 2.1)

65%

target average OKR score: teams set roughly 1.5 times the goals they expect to finish (Section 3.2)

1 vs 1,993

actions rerun in our simulated 3,000-target build after one cache miss, with deterministic vs timestamped outputs

THE PROBLEM

Most engineering organizations struggle to keep code quality, release speed and collaboration across teams as they grow. Google had grown to tens of thousands of engineers in one codebase; how did its everyday practices make that workable?

THE IDEA

An experience report by a long-time Google engineer cataloging the practices: a single repository with owners per directory, a distributed hermetic build system, mandatory code review, unit tests and presubmit checks, frequent automated releases with canaries, launch approvals, post-mortems, rewrites, 20% time, OKRs and separate engineering and management career ladders.

THE RESULT

No experiments; a description. As of January 2015 the repository held 86 TB, a billion files, 2 billion lines of code and 35 million commits, with 40,000 commits per working day, nearly all at head. The practices are presented as what makes that scale workable, with some admitted gaps, such as unclear project approval.

02

Why it matters to an FDE

These practices are the default vocabulary of good engineering. Owners files, mandatory review, presubmit tests, green trunk, canary releases and blameless post-mortems show up at well-run customers and are what you recommend at the rest. Knowing where they came from and why they work makes your recommendations specific.

AI systems need the same discipline, adapted. Prompts, retrieval configs and evaluation sets are code: keep them in the repository, review them, run regression evaluations as presubmit checks, roll out behind canaries, and write post-mortems when a model change causes harm. The paper's release path maps almost one to one onto safe model rollouts.

Determinism is what makes caching and reproduction possible. Google scrubbed timestamps from build outputs so results could be cached. In our simulation, one non-deterministic step turned a single rebuilt action into 1,993. LLM pipelines have the same issue: pin model versions, seeds and prompts so results can be reproduced and cached.

Small changes get reviewed well. The review tool labeled changes over 300 lines "large" and worse. AI-generated code makes large changes cheap to produce and expensive to review; keep the norm of small, reviewable changes.

Scale changes what is needed. At 1,700 commits an hour, head would be broken most of the time without presubmit checks and fast rollback, per our model. A ten-person customer team does not need Google's apparatus; pick the practices that match their size and pain.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 290 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    Repository, build, review, testing, release, launch, post-mortems, rewrites, people practices

    Free account
  2. 04How it works

    Repository and ownership, the build system's guarantees, review, testing, release and launch

    Premium
  3. 05The numbers that matter

    Repository scale, review size labels, release cadence, OKR targets, team sizes, derived ratios

    Premium
  4. 06Try it yourself

    Derive ratios from the paper's numbers, simulate a hermetic cached build, and model a green trunk

    Premium
  5. 07Where it breaks

    One person's account, no measurements, survivorship, and practices that need Google's tooling

    Premium
  6. 08Using it on a deployment

    Bring release discipline to models and prompts, pin for determinism, scale practices to the team

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →