Skip to content

Storage Solution

There are different approaches and services available for repositories to use as a Git LFS host:

10 people, 200GB storage

  • GitHub
  • GitLab
  • AWS CodeCommit
  • Azure DevOps
  • Self Managed, with multiple alternatives
  • Cloud hosted Virtual machine
  • Cloud hosted storage (AWS S3, Cloudflare R2) with Serverless function

Considerations

When investigating these providers, it is important to notice that a lot of them put bandwidth costs/limitations in place. These can get very expensive.

For example: If there's 10GB of data in the LFS server, every time someone clones the full repo (all branches and history), they will download 10GB of data. This quickly becomes expensive if bandwidth is charged for.

For this research, lets assume a 20 man team with 100GB storage needed (bandwidth at least 1TB)

GitHub

  • Storage: 1GB Free, $5/month per 50GB afterwards
  • Bandwidth: 1GB free, $5/month per 50GB afterwards (included in storage packs)
  • Cost estimation: $100+ (1TB BW = 20*50GB packs)
  • Pros:
    • Already have our code in GitHub, fully integrated
  • Cons::
    • Becomes expensive, especially with the bandwidth limitations

GitLab

  • Storage: 5GB Free, $60/month per 10GB afterwards
  • Bandwidth: 10GB free, $60/month per 20GB afterwards (combined with storage)
  • Cost estimation: $3000+ (1TB BW = 50*20GB packs)
  • Pros:
    • Little to be found specifically when looking for LFS functionality
  • Cons::
    • Very expensive

AWS CodeCommit

  • Storage: 10GB/member (minimum of 50GB), if more is needed: $0.06/GB
  • Bandwidth: Free
  • Cost estimation: $15 (20 users = 15*$1)
  • Pros:
    • Cheap, Every user is $1/month (first 5 free)
  • Cons::
    • Complex to set up, manage and use. Would require migrating

Azure DevOps

  • Storage: Free Unlimited
  • Bandwidth: Free
  • Cost estimation: $90 (20 users = 15*$6)
  • Pros:
    • No storage limit
  • Cons::
    • Cost per user with repo access: $6/month (5 first users are free)
    • Would require migrating

Self Managed - Cloud Virtual Machine

This assumes Digital Ocean as we already have services with them.

  • Storage: $1/month/10GB
  • Bandwidth: Depending on the VM ($12/month = 2TB included)
  • Cost estimation: $22 ($12 + $10)
  • Pros:
    • Full control
    • No per user pricing, but not cheap
  • Cons::
    • Must be maintained manually, lots of effort (Backups, security, ...)

Self Managed - Cloud storage

This assumes Cloudflare as we already have services with them.

  • Storage: 10GB/month free, $0.015/GB/month
  • Bandwidth: Unlimited
  • Requests:
    • R2 Write - 1 000 000 requests/month free, $4.5/million/month after that
    • R2 Read - 10 000 000 requests/month free, $0.36/million/month after that
    • Worker
      • 10 000 000 requests/month free, $0.30/million/month after that
      • 30 000 000 CPU milliseconds free, $0.02/million/month after that
  • Cost estimation:
    • Assuming within free request/month limits (very likely): $1.44 (90GB = 90*$0.016)
    • Doubling requests (read & write): $6.30
    • Worker must be priced as well: Currently costs us ~$15/month, which would maximum increase with $5
    • Total: ~$12/month
  • Pros:
    • Full control
    • No per user pricing
    • Cheap
    • We already have a worker plan
  • Cons::
    • Must develop a worker to host Git LFS API

Proposed Approach

Use a Cloudflare Worker that can serve as the Git LFS API service, while using an R2 bucket as the storage backend. Because of the POST limits on Workers, the design would use direct links to the R2 bucket for actual upload and download. Luckily the Git LFS API is fully designed to support this model.

More details will be discussed in the Cloudflare Git LFS Worker page.

Reference material