Platform EngineeringProblem 2 of 4
PlatformHardDeep Dive available
Design GitHub
Design a code hosting and collaboration platform like GitHub. Support Git repository hosting, pull requests with merge-base diffs and inline review, branch protection, CI/CD (GitHub Actions) on per-job VMs, code search with a trigram inverted index, fork networks with shared object pools, and webhook fan-out. Envelope: ~200M repos, hundreds of millions of developers, ~1B Git ops/day (clone, push, fetch), millions of workflow runs daily. Key tensions: ref quorum vs object replication, merge-base-aware diff caching, fork-aware garbage collection, the broadcast-vs-per-target async split, and VM-grade isolation for untrusted CI.
Key Topics
Git Object StoragePull Request SystemCode ReviewCI/CD IntegrationRepository SearchFork ModelEvent & Job Queue SplitAccess Control