Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Everyone is doing Git on S3 wrong

The article discusses the limitations of Git hosting solutions that rely on object storage, specifically Amazon S3. Traditionally, Git hosting has used SSD disks, which provide fast random access storage, but this comes at the cost of potential disk failures, the need for RAID and backups, and eventually running out of disk space. Object storage, like S3, has become more reliable and offers durability, automatic replication, and unlimited capacity. This has led to efforts to move Git repositories onto object storage.

One notable attempt is Cursor/SpaceX's Continuity, which utilizes S3-backed Git storage, specifically an S3-backed write-ahead log (WAL) for Git. Other open-source implementations have followed a similar approach, moving scalability and durability to object storage. However, these implementations still rely on the canonical Git CLI, which memory maps files on disk. This means that each repository must be fully loaded on disk before it can be served, resulting in write-heavy traffic causing performance issues.

The article outlines the challenges Git faces when stored on object storage. Git is fundamentally a content-addressed storage system with mutable pointers, which allows objects to point to any other object and enables efficient querying. However, treating Git as just content-addressed storage on object storage would result in each step being a 30-40ms round trip, making it unsuitable for Git.

To address these challenges, Cursor/SpaceX's Continuity design stores Git repositories as immutable packfiles and uses a WAL index to log each push. Packfiles are served through conditional PUTs against the WAL index, enabling any machine to rebuild a local copy from the log and serve fetches. This approach scales reads well, with Cursor reporting linear read scaling up to 100 servers.

However, the write path still depends on a single linearizable sequence of packfiles, causing competing write operations to contend for the same WAL index object, which can be bottlenecked by the speed of Git's disk compaction. While the Continuity design significantly raises the ceiling for Git hosting, it still falls short of making Git fully scalable, as it remains a single-writer system.

Rewritten by urgent.news; may contain errors — check the original.

Source: enroute.sh

Read the original at enroute.sh →

Report a problem with this story

More in Tech

Govt Plans to Share Everything

The Pakistan Digital Authority (PDA) has proposed a new data-sharing framework to connect government departments and make it easier for … Read More The post Govt Plans to Share Everything appeared…

More from Thursday 15 October →