Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

GitHub Engineering 15 min read Case study hardMaster

Inside GitHub’s new Git storage architecture

GitHub's new Git storage architecture, Rubicon, rests on one observation: only reference updates need ordering. Git objects go to Azure Blob Storage, and refs plus the pack manifest go to a small quorum-replicated compare-and-swap log called Ref-CAS. Disposable virtual replicas serve reads and writes from a rebuildable cache, while separate lease-based compaction nodes merge packs in the background, so storage, serving and maintenance scale independently. Ref-CAS replaced blob-based ref logs, which topped out at the mid-hundreds of writes per second or traded away read latency. It reaches tens of thousands of ref operations per second, and internal tests sustained 7,200 pushes per second from 5,000 concurrent agents on one repository.

Assumes: Git packfiles and referencesquorum replicationobject storage conditional writes

Related posts

  • Building Git infrastructure for agent-scale development

    GitHub Engineering easyNovice

    GitHub is rebuilding its Git storage layer because agent-driven workloads are colliding with the design of Spokes. Spokes keeps five full repository replicas on local disks and coordinates every ref update with a three-phase commit quorum, so adding read replicas slows writes. The new design keeps coordination only for the reference update itself and moves compaction and garbage collection to separate workers. It also puts authoritative data in Azure Blob Storage, with stateless caching compute workers serving reads and scaling independently. Internal benchmarks show up to 35x higher write throughput, driven by 4.9x year-over-year push growth and 7.38 billion commits in a month.

  • The bridge to agent-scale Git infrastructure

    GitHub Engineering mediumAdept

    GitHub has moved nearly all Git repositories to replicas split between its own data centers and Azure. The last, busiest repositories were held back by a 25ms cross-region round trip, because Spokes' quorum serialized every write behind a repository-wide lock. Narrowing the quorum's scope to individual references lets writes to different branches proceed concurrently, giving 3–4x higher throughput at lower latency in internal testing. A 'virtual write replica' makes Azure Blob Storage a quorum member and coalesces disjoint-reference writes into shared I/Os, so ephemeral read replicas can warm from object storage and scale independently of the write path.

  • Scaling Git at OpenAI

    OpenAI hardMaster

    Pando is OpenAI's new Git backend for its monorepo, built to handle the concurrent pushes and fetches generated by Codex-driven parallel development while staying fully compatible with the Git protocol and client. Each branch is coordinated independently: incoming packs are stored as immutable blobs and ref versions are recorded in a horizontally scalable metadata store. This gives per-ref serializability but only causal consistency across the repository. Packfiles are reused across fetches rather than generated per client, trading some redundant bytes for far less server CPU and I/O. Compared with three-phase-commit replicas and a shared-manifest WAL in blob storage, Pando avoids a single write ordering point, and in production it cut median push latency nearly 5x while serving close to a petabyte of Git data per day.

  • Session revocations at scale

    Canva Engineering mediumAdept

    Canva moved its gateway session-revocation cache from per-pod MySQL loads to sorted binary chunks in S3, eliminating the database stampede when hundreds of gateway pods started during deploys. Revocations are packed into 16-byte records in sorted flat arrays split into 30-minute S3 objects. Gateways binary-search the downloaded bytes directly and refresh recent chunks with conditional GETs. A ZooKeeper-elected worker appends new revocations, using conditional PUTs for optimistic concurrency so that racing writers never lose updates. The theoretically O(N^2) rebuild still exceeds 2000 revocations/sec, memory use dropped 87.5%, and read replicas were cut to two.

  • Migrating the Hub from Git LFS to Xet

    Hugging Face mediumAdept

    Hugging Face moved 500,000 repositories and about 20 PB from Git LFS to its Xet content-addressed storage with almost no user disruption. Two pieces made that possible. A Git LFS Bridge lets older clients keep working by returning presigned URLs and reconstructing files from chunks in S3. A webhook-driven background pipeline, with an orchestrator batching files into jobs of 1,000 files or 500 MB for worker pods, migrates LFS content without locks. Scaling to multi-petabyte accounts exposed three problems: a cross-mount `/tmp` move bug that filled disks, an undersized CAS, and network/EBS I/O bottlenecks on the workers. After fixes, CAS throughput rose from about 35 Gb/s to peaks near 300 Gb/s.

The quest for software engineering knowledge.

Look:
Layout: