arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.11977cs.SEcs.DC
收藏

GitFarm: 为大规模单体仓库提供 Git 服务

GitFarm: Git as a Service for Large-Scale Monorepos

Uber Technologies Inc.(优步科技有限公司)

Preetam Dwivedi, Akshay Hacholli, Adam Bettigole

AI总结:

针对 Uber 单体仓库中传统 Git 工作流的瓶颈问题,GitFarm 通过 gRPC API 提供状态化、身份范围化的 Git 服务,减少本地克隆和 I/O 开销,提升性能和可扩展性。

摘要:

在 Uber 的单体仓库规模下,传统 Git 工作流成为关键瓶颈。克隆多吉字节仓库、维护本地检出、定期从上游同步以及执行重复的拉取或推送操作消耗了数百个自动化系统的大量计算和 I/O 资源。尽管 CI 系统如 Jenkins 和 Buildkite 提供了缓存机制以减少克隆时间,但这些方法在实践中导致显著的基础设施开销、手动维护、缓存命中率不一致以及大型单体仓库的冷启动延迟几分钟。此外,数千个独立的克隆和拉取操作给上游 Git 服务器造成沉重负载,使它们变慢且难以扩展。为了解决这些限制,我们提出了 GitFarm,一个通过 gRPC API 提供 Git 服务的平台,该服务是状态化、身份范围化的、以仓库为中心的执行服务。GitFarm 通过在安全、临时的沙盒中远程执行 Git 操作,将仓库管理与客户端解耦,这些沙盒由预热的仓库支持。该系统强制实施身份范围的授权,支持多命令工作流,并利用专用后端集群实现工作负载隔离。对于客户端来说,这种设计消除了本地克隆,提供在不到一秒内即可使用的检出,并通过将操作转移到 GitFarm 显著降低了客户端的计算和 I/O 开销。此外,客户端服务不再经历由于每个主机上的初始单体仓库克隆而导致的冷启动(长达 15 分钟)。结果表明,将 Git 作为服务提供了显著的性能和成本优势,同时保持了原生 Git 语义的灵活性。

英文摘要:

At the scale of Uber's monorepos, traditional Git workflows become a fundamental bottleneck. Cloning multi-gigabyte repositories, maintaining local checkouts, periodically syncing from upstream, and executing repetitive fetch or push operations consume substantial compute and I/O across hundreds of automation systems. Although CI (Continuous Integration) systems such as Jenkins and Buildkite provide caching mechanisms to reduce clone times, in practice, these approaches incur significant infrastructure overhead, manual maintenance, inconsistent cache hit rates, and cold start latencies of several minutes for large monorepos. Moreover, thousands of independent clone and fetch operations add heavy load on upstream Git servers, making them slow and difficult to scale. To address these limitations, we present GitFarm, a platform that provides Git as a stateful, identity-scoped, repository-centric execution service through a gRPC API. GitFarm decouples repository management from clients by executing Git operations remotely within secure, ephemeral sandboxes backed by pre-warmed repositories. The system enforces identity-scoped authorization, supports multi-command workflows, and leverages specialized backend clusters for workload isolation. For clients, this design eliminates local clones, provides a ready-to-use checkout in less than a second, and significantly lowers client-side compute and I/O overhead by offloading operations to GitFarm. Also, client services no longer experience cold starts (up to 15 minutes) due to initial clones of the monorepos on each host. The results demonstrate that Git as a service provides substantial performance and cost benefits, while preserving the flexibility of native Git semantics.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑