Improved performance of the delete API for the Container Registry front end
Problem to solve
The GitLab Container Registry allows developers to build, push and share Docker images/tags using the Docker client and/or GitLab CI/CD.
For organizations that build many images across many projects, it is important to regularly remove old, unused images and tags. There are two required steps for deleting images from the registry. The first is to untag images, which can be done via the Container Registry UI or leveraging the Container Registry API. The second step is to run garbage collection and remove any blobs (can be layers or manifests)from storage.
The problem is that the API (Projects::Registry::TagsController#bulk_destroy
) is currently the worst performing controller/action on GitLab.com. It has a p95 of 40s and some requests take up to 60s to complete. Projects::Registry::TagsController#destroy
is not far behind.
Intended users
- Delaney (Development Team Lead)
- Sasha (Software Developer)
- Devon (DevOps Engineer)
- Sidney (Systems Administrator)
Further details
- Examples of this request on GitLab.com: https://log.gitlab.net/goto/f29aea9c71acf7116fac0f84ac17ca95
User Interface Example
Background
- The bulk delete API does currently run as a background job.
- The API that powers the front end is not a background job.
Proposal
- Improve the performance of the delete API that powers the frontend, so that we improve the performance and availability of the Container Registry user interface.
- One option could be moving it to a background job.
- Another could be improving the logic or optimizing the code (if possible)
Documentation
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.