Git at any scale
Summary
Vicent Martí explains how Cursor’s Continuity scales Git hosting: repositories sit on fast local disks, but a write-ahead log in S3 is the source of truth.
Packfiles govern the server architecture.
Git clients exchange packfiles, and local Git operations perform linked logical and physical walks through them, so storage designs must respect their access pattern.
Distributing the wrong layer compounds latency.
Object stores turn graph traversal into sequential network round trips, while network filesystems turn random packfile access into remote I/O.
GitHub’s Spokes buys consistency with a fixed replication cost.
Three-phase commit keeps every replica current, but more replicas increase tail latency and every cold repository still needs a quorum.
With three-phase commit, the floor is always too high, and the ceiling too low.
Move durable truth outside the serving replica.
Continuity records each push in an S3-backed write-ahead log, then treats local NVMe repositories as materialized caches that can be rebuilt anywhere.
We treat repositories like a warm cache on disk, but the source of truth is always the write-ahead log in S3.
We never acknowledge a push until it has been fully persisted to the WAL.
Make unreliable acceleration safe.
Gossip speeds replication, conditional S3 reads prove freshness, and WAL compaction lets replicas download prepared packs instead of repeating CPU-heavy repacks.
Read the original ↗Save to your Sponge
Summarized with Sponge. Quotes are the author’s own words.