Improve performance of Project Releases API under load
After adding in a new performance test for the Project Releases API it was found that endpoint is unperformant:
* Environment: 10k
* Environment Version: 13.8.0-pre `97951c1cd62`
* Option: 60s_200rps
* Date: 2021-01-21
* Run Time: 1h 9m 41.76s (Start: 01:31:16 UTC, End: 02:40:58 UTC)
* GPT Version: v2.5.0
NAME | RPS | RPS RESULT | TTFB AVG | TTFB P90 | REQ STATUS | RESULT
---------------------------------------------------------|-------|----------------------|-----------|----------------------|----------------|-------
api_v4_projects_releases | 200/s | 119.75/s (>64.00/s) | 1530.14ms | 2543.49ms (<4000ms) | 100.00% (>99%) | Passed
Looking at the environment metrics it appears that the bottleneck could be GitLab Rails
Testing was done as part of our normal performance tests on the 10k Reference Architecture at 200 RPS. In our test data (based on the main GitLab project) there are numerous releases, the same amount as the current main GitLab project.
As per our performance targets the endpoint is above our main target of 500ms and falls under the severity2 tier.