Update the Dependency Proxy to use workhorse
Problem to solve
The Dependency Proxy allows users to reduce risk and reliance on external dependencies by caching frequently used packages for fast, reliable access. However, since the Rails app downloads the blobs from upstream sources, it's possible that while downloading is in progress, it will block other requests. In other words, heavy use of the dependency proxy can cause Unicorn to be busy and delayed in serving other user requests.
To mitigate that risk we decided to enable the dependency proxy, only for users that are using the Puma web server.
The problem is that Puma support is experimental at this time and not recommended for production yet. In order to drive adoption, increase our user base and allow our users to take advantage of the dependency proxy, we need to remove the reliance on Unicorn for downloading dependencies so that we can ensure fast response times of the GitLab application.
We will move the download logic to workhorse and off of unicorn/puma web servers. This will ensure that we don't waste unicorn workers while downloading blobs from upstream.
See here for background and how we decided to only enable the feature for the Puma web server. to enable feature only for Puma web server.
Permissions and Security
- There are no changes to permissions required for this change.
- There is a separate issue to add authentication for the dependency proxy: https://gitlab.com/gitlab-org/gitlab-ee/issues/11582
- We will update the documentation for enabling and configuring the dependency proxy to remove the note about Puma and add any necessary clarifying details.
- Test downloading of blobs works as expected
- Performance testing at scale
What does success look like, and how can we measure that?
Success looks like we agree as a team that we can roll out the dependency proxy to gitlab.com. Once live, we can track adoption of the dependency proxy by the following metrics over time:
# of groups with the feature on/off
median # of items in the proxy per
What is the type of buyer?
The goal of this project will be to bring this feature to all types of buyers. Currently the feature is limited to Premium and Ultimate customers, but rolling it out to GitLab will allow us to bring value to all customer tiers.