# Go module proxy at Grab

[Grab](https://yomu.fyi/company/grab) · Jerry Ng · Jun 30, 2023

**Type:** Problem & solution

## Summary

Grab's 69.3 GiB multi-module Go monorepo caused commands like go get to take over 18 minutes as Git repeatedly traversed commit history, downloaded large worktrees, and overloaded their GitLab VCS infrastructure. To bypass direct VCS queries without losing automatic updates for external repositories, the team deployed the Athens Go module proxy configured in fallback network mode. They used the GOVCS environment variable to disable Git access specifically for the monorepo path, forcing Athens to fall back to its internal object storage when resolving monorepo modules. A dedicated CI pipeline pre-populates and refreshes the Athens cache whenever new monorepo modules are released. This setup reduced monorepo go get execution times to approximately 12 seconds and allowed a 70% scale-down of the Athens proxy cluster.

## Context

Executing Go commands like go get and go list against Grab's massive 69.3 GiB Go monorepo took up to 18 minutes, severely slowing developer workflows and overloading GitLab VCS servers with heavy Git operations.

## Approach / What changed

Deploying the Athens Go module proxy using fallback network mode alongside GOVCS settings that disable VCS lookups exclusively for the monorepo, backed by a custom CI cache-refresh pipeline on module releases.

## Takeaways

- Running go get on a multi-module repository with 64.7k directories and 10.7k refs triggered expensive Git tree traversals that took over 18 minutes with a local cache and over an hour without one.
- Setting GOVCS to disable VCS access for the monorepo while configuring Athens in fallback mode directs monorepo module queries to storage while preserving automatic VCS lookups for other repositories.
- Bypassing direct VCS hits during Go module retrieval reduced go get duration to ~12 seconds and decreased Athens cluster CPU and memory usage enough to scale the cluster down by 70%.

**Tags:** [Caching](https://yomu.fyi/topic/caching), [CI/CD](https://yomu.fyi/topic/ci-cd), [Developer Experience](https://yomu.fyi/topic/developer-experience), [Go](https://yomu.fyi/topic/go), [Performance](https://yomu.fyi/topic/performance)

[Read original post](https://engineering.grab.com/go-module-proxy)
