Monorepo Build Systems
Hermetic builds, dependency graphs, remote caching, incremental rebuilds. How Google, Meta, Microsoft, Vercel keep monorepos fast.
Overview
What a monorepo is
A monorepo is a single repository containing multiple projects: services, libraries, frontends. The pattern is mainstream. Google's monorepo is the canonical extreme (~2 billion lines, multi-thousand engineers; Potvin and Levenberg, 'Why Google Stores Billions of Lines of Code in a Single Repository,' CACM 2016), and Meta (Mercurial-based), Microsoft (Windows on Git, with VFS for Git) and many product companies use it.
Key concepts
- Monorepo
- Hermetic build
- Build graph / target graph
- Remote cache
- Remote execution
- Affected projects
Interview questions
- What problem does a monorepo build system solve that pnpm workspaces does not?
- How does remote caching work, and what does hermeticity have to do with it?
- When should you choose Bazel over Nx or Turborepo?
Sign up free to read the full topic
More DevOps topics
- Linux Cron & Task Scheduling
- Local Kubernetes Cluster Setup (minikube / kind / k3d)
- Log Aggregation
- Microservices Design
- Migration and Production Patterns
- Monitoring and Troubleshooting
- MSVC Toolchain and Windows Native Build
- Multi-Cluster GitOps
- Native Artifact Signing and Release
- Native Debugging — gdb, Core Dumps and Symbols
- Node and Scaling Errors — NotReady, Scale-Up, Drain, Terminating and HPA
- Notifications, Alerts and Webhooks
Start free on Cariara · Coding problems · System design studio