Skip to content
Innovation & Growth

GitHub is easing a write lock to move its busiest repositories to Azure

The busiest repositories have not yet moved. GitHub Engineering says one lock and a 25ms delay held them back

W
WebPulse Newsroom
AI-assisted · 4 min read
Share on X LinkedIn
GitHub is easing a write lock to move its busiest repositories to Azure
In brief
  • GitHub Engineering says nearly every repository now lives in both its data centers and Azure. The busiest do not yet, held back by a repository-wide write lock and a 25ms round trip.
  • GitHub is changing the quorum to order writes per reference, not per repository. In internal testing it reports 3–4x higher throughput for writes to different references. The work is under way.
  • Leaders can ask whether their own systems lock more than they need to, and whether a migration is being combined with a redesign.

Most scaling problems are not about too few machines. They are about a rule that makes work wait when it does not need to. GitHub Engineering describes one such rule in its Git storage. The way GitHub is loosening it holds a lesson for anyone running a platform that software agents now write to.

Nearly everything has moved. The busiest repositories have not.

GitHub Engineering reports that over the past year, 99.99999% of the Git repositories on GitHub gained a second home in Azure, alongside GitHub's own data centers. The remaining 0.00001% are among the busiest on the platform. They have not yet moved.

The first Azure copy of a repository was placed in the Central US region in August 2025. GitHub says Azure now serves about half of Git traffic. A typical repository keeps two of its five replicas, or copies, there.

GitHub names four pressures behind the pace: the shift to agents, fast-growing traffic, a ceiling on power in its data centers and the nearby region, and physical supply chain limits. When the migration began, the room left to expand allowed a careful move. It did not allow a leisurely one.

How one lock turned distance into a queue

GitHub's storage layer is called Spokes. It keeps several copies of each repository and uses a quorum, meaning a majority of copies must agree before a write is committed. In practice, Spokes waits for every healthy copy to answer, up to a timeout. The slowest healthy copy therefore sets the delay for every write.

A write also locks the whole repository until it is committed. That means one write is in progress at a time. GitHub says a copy in the target Azure region sits about 1,000 miles from its data centers. Each network round trip takes around 25ms, and a write needs several.

Picture a single till where each payment must be confirmed by a distant bank before the next customer steps up. The bank is not slow. The single line is the problem. GitHub says a repository already near its ceiling would fall further behind with every push.

The change: order writes per branch, not per repository

GitHub says it is changing the quorum so that it covers individual references, not the whole repository. A reference is a name that points to a commit, such as a branch. Git's consistency rule applies to each reference separately. Once a server accepts an update, no client should later see an older value for that reference.

Updates to different references mostly do not depend on each other. An agent and a developer each pushing to their own branch is the kind of case GitHub describes. Those writes can now proceed in parallel. Each still pays the cross-region delay, but they no longer share one line. Writes to the same reference still wait for each other.

In GitHub's internal tests with realistic traffic, writes to different references consistently ran with three to four times the throughput and lower latency. That is GitHub's own result, not an independent measurement. GitHub says the change is meant to get the last remaining repositories into Azure.

A path to replicas that hold no state

GitHub says most repositories see between 100 and 1,000 reads for every write. Today the same replicas serve both, so reads and writes compete for resources and cannot be scaled separately.

The next step makes Azure Blob Storage, a cloud object store, a member of the quorum. GitHub calls it a virtual replica. The compute behind it is GitHub's first fully ephemeral node, meaning it keeps no lasting state. A write is confirmed only once it is safely stored there. That adds some delay, but GitHub says per-reference ordering keeps it from capping throughput.

Read-only replicas can then be added on demand. Each fills its cache from object storage and serves reads without joining the quorum. GitHub says its load-testing tool regularly found limits in today's design. Against virtual read replicas, the tool ran out of capacity first.

What is still open

GitHub states the limits itself. These read replicas sync with object storage in the background, which suits some read workloads but not all. And the quorum "remains the bounding factor" for raising write throughput further. GitHub says a follow-up post on the end state is due next week, tied to GitHub Universe.

Move first, redesign second

GitHub says it had prototypes of new architectures. It still chose not to change the storage design and the hosting platform at once, because doing both under that growth carried too much risk. It moved the data first and is evolving the design now that the data is there.

This is the article's reading, not GitHub's. The distance to Azure appears to have turned a small per-write cost into a ceiling for the busiest repositories. Separating the move from the redesign makes each step easier to judge and to reverse.

Questions to put to your team

Where do our systems order more work than they must? Ask which locks cover a whole record, account or repository when the real dependency is much smaller.

What happens to those locks when automated agents write around the clock? A design tuned for occasional contention may behave differently under steady parallel writers.

Are we combining a migration with a redesign? If so, who decided the risk was worth it, and what is the fallback?

If a vendor hosts your critical data, ask how it handles cross-region delay and write contention. GitHub's account is a useful template for the answer, though its work is still in progress.

The busiest systems often stall on the rules that decide who waits for whom, not on a lack of capacity.

Produced by the WebPulse Newsroom with AI assistance from the original reporting credited below, and checked against that source by our editorial review. How we use AI.
Original reporting: GitHub Engineering.