Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,763
    • Issues 44,763
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,330
    • Merge requests 1,330
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #294187
Closed
Open
Issue created Dec 16, 2020 by Tim Rizzi@trizziDeveloper

TTL Policy for the Dependency Proxy

Problem to solve

You can use the GitLab Dependency Proxy to proxy and cache container images from Docker Hub. This can help you by decreasing your reliance on external dependencies and decrease your average build times.

The problem is that if you continue to use the feature the cache will begin to fill up with a lot of stale data. You can always clear the cache using the API. But GitLab should have a standard TTL and eviction policy for clearing the cache so that we don't waste money on storage.

Proposal

Add a daily job that will remove all artifacts from the Dependency Proxy that are more than 90 days old.

Why this is important

We are actively discussing how to grow adoption of this feature, including expanding the scope to allow for pulling container images from Amazon (ECR) and Google's (GCR) container registries. This could result in many more images being added to the cache and object storage.

When a new/unknown artifact is cached at time T, set its TTL to T+90. The artifact should be removed from the cache after 90 days.

Why 90 days

I chose 90 days because that is the most common setting for the Container Registry cleanup policy, as seen in the pie chart below. Also, the majority of policies are set up to run daily.

CleanuppoliciesCadenceusageping Cleanuppoliciessettingsofdaystoremoveimagesusageping__2_

Edited Sep 17, 2021 by Tim Rizzi
Assignee
Assign to
Time tracking