Inside Rubicon: How GitHub Is Rebuilding Git Storage for Parallel Agents


A repository with a few human contributors might receive a burst of pushes and then sit quiet. A repository used by thousands of coding agents has a different rhythm: branches change constantly, and every push triggers fetches from CI, deployment systems, and other agents. GitHub says its busiest repositories today see at most dozens of writes in a second, but it is designing for sustained rates two orders of magnitude higher. In an internal test, its new architecture handled 5,000 agents and 7,200 pushes per second against one repository while serving reads at low latency.

The interesting part is the split between two kinds of Git state. Objects such as commits, trees, and file content are immutable and identified by content. References such as branches are small, mutable pointers. Thousands of writers can upload different objects without coordinating. They need agreement only when a reference changes. GitHub’s project, called Rubicon, turns that property into the organizing rule for the whole storage system.

The pressure is concentrated in one repository

GitHub already partitions work across repositories. The new challenge is vertical: many workers operating on the same repository at once. GitHub reported that requests to one repository rose from an average of 44 million per day in March 2026 to 181 million in May. A push is also an amplifier. One new commit can cause many independent reads, so optimizing writes at the expense of every fetch would make the overall system worse.

The design therefore needs many writer nodes, short push latency, cheap checks for unchanged references, and maintenance that can keep up with newly created packs. It also needs a durable order for changes to each branch. A client must never see a reference pointing to objects that have not been safely stored.

Four pieces with separate jobs

Requests from Git clients, APIs, and the web reach Spokes, GitHub’s routing and placement layer. Spokes sends each repository’s traffic to a small group of virtual replicas. These replicas serve reads and writes, and keep local disk caches. They can be replaced: their local state is not the source of truth. Routing tries to keep caches warm, but correctness does not depend on choosing a particular replica.

Durable object packs and read accelerators live in Azure Blob Storage. The mutable part lives in Ref-CAS, a replicated log that stores references and the repository’s pack manifest, the list of packs currently composing the repository. Finally, separate compaction workers merge packs and perform maintenance. This frees request-serving replicas from spending their CPU on housekeeping.

Spokes routes Git requests to disposable virtual replicas; immutable packs reside in Blob Storage, while Ref-CAS stores references and the pack manifest. Independent workers compact packs.
Rubicon separates serving, immutable storage, reference transactions, and maintenance.

The earlier migration stage placed copies of almost all repositories in Azure and introduced virtual replicas. That bridge allowed GitHub to change its storage architecture while the existing service continued operating. Rubicon builds on it by replacing the old repository-wide coordination point with a much smaller one.

A push stores data before moving a branch

When a push arrives, a virtual replica checks connectivity and indexes the incoming pack. It uploads that pack to Blob Storage. Only after the objects are durable does it submit a Ref-CAS transaction that adds the pack to the manifest and changes the requested references. The order matters: a committed branch head must always be readable.

Each reference update uses compare-and-swap. The writer supplies the value it expects; the transaction succeeds only if the reference still has that value. A transaction locks only the references it touches and is committed after a majority of the log’s replicas record it. Two agents updating different branches can proceed in parallel. Two racing on one branch cannot both claim the same old head; one must retry or resolve a conflict.

Every committed transaction receives a log sequence number (LSN). That number is also a convenient repository version. A replica answering a read sends the version of its cached reference state to Ref-CAS. If nothing changed, the response need only say so. If it is behind, Ref-CAS returns updated references and pointers to packs the replica needs. Since reads greatly outnumber writes, making the unchanged case cheap is central to the design.

A push uploads its pack before a Ref-CAS transaction publishes the reference; a read checks its cached version and downloads packs only when behind.
Object durability comes before reference publication; ordinary reads begin with a version check.

Why a blob alone was insufficient

GitHub first tried keeping reference state in object storage. A single conditionally updated blob made reads simple: check one version. It also serialized every write through one network round trip. Batching brought that prototype only into the mid-hundreds of writes per second. Splitting references among blobs let unrelated branches update concurrently, but each read then had to check every segment and wait for the slowest. That shifted cost onto the much more frequent operation.

Ref-CAS keeps a small consensus service for just the mutable metadata. It does not store packs or validate their contents. That narrow role lets reference transactions reach tens of thousands of operations per second in GitHub’s tests, while Blob Storage carries the large immutable bytes. The distinction is useful beyond Git: high-volume systems often scale better when large immutable payloads and small contested pointers have different storage paths.

Keeping pack growth under control

Each push creates another pack. Git can search multiple packs, but unbounded pack growth would gradually make reads expensive. In the old design, compaction ran on the same replicas that served traffic and had to run on every replica. Rubicon moves this work to a fleet of dedicated workers operating directly on Blob Storage and Ref-CAS.

A worker takes a lease on one shard, gathers new packs into an open segment, and seals the segment when its pack count, age, or size crosses a threshold. It combines those packs into fewer larger packs and verifies that the resulting packs contain exactly the same objects. It uploads the replacements, adds them to the manifest, and then removes the original packs in a separate transaction. Cleanup deletes the old bytes later. A new segment can collect incoming packs while the sealed one is being processed.

Packs are assigned to shards by hash. More shards and workers can increase compaction throughput, and smaller compacted packs can be merged again in tiers. This is how GitHub aims to keep the pack count approximately flat while push rates rise. Garbage collection is a separate operation: compaction preserves all objects, whereas garbage collection eventually removes unreachable ones left by deleted branches or force pushes.

What this changes, and what remains ahead

Rubicon scales its parts independently: add virtual replicas for request load, Ref-CAS capacity for reference traffic, and compaction workers for pack creation. Git commands and branch protections remain familiar to clients. The reported throughput is an internal test, not a promise that every public repository already has this capacity. GitHub says the system is in limited private preview, with broader rollout planned for early 2027.

The roadmap extends beyond this storage layout. GitHub plans partial replicas, fetching individual objects without downloading full packs, placing replicas nearer to workloads, and materialized views such as ready-made archives. It also describes agent-facing operations that could avoid full clones, commit several file changes atomically, and subscribe to repository events. Those are future directions, not features delivered by this storage release.

The core engineering lesson is precise: Git’s immutable objects already permit broad parallelism. The hard boundary is publishing a mutable name that points at them. Rubicon makes that boundary small, explicit, and independently scalable, then moves read caches and pack maintenance around it.

Sources

100%