saved
Git at any scale
gist
Vicent Martí explains why Git hosting gets harder as repository traffic and count grow, then presents Cursor’s Continuity architecture. It keeps ordinary Git repositories on fast local disks, but makes an S3-backed write-ahead log the source of truth. Linearized writes, compare-and-swap updates, conditional reads, disposable replicas, rendezvous routing, and primary-only compaction let the system scale hot monorepos up and idle agent-created repositories down without weakening consistency.
ideas
- 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.
- 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.
- 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.
- 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.
quotes
“With three-phase commit, the floor is always too high, and the ceiling too low.”
“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.”