Skip to content

Optimization: Projects API unauthenticated request with id_before has an average duration above 10s

Related to: Investigate performance degradation in `GET /ap... (#577794)

Kibana Chart (internal): https://log.gprd.gitlab.net/app/r/s/FaCHf

We need to look into why requests to the Projects API (/api/v4/projects) that are unauthenticated and has a id_before parameter consistently performs poorly.

  • The average duration for requests of this type is ~11.7s
  • Removing the id_before filter drops the duration to ~0.39 s

Looking at the logs, it appears the the bottleneck comes from Gitaly calls.

  • In a snapshot where the average duration of requests is 13s -- the average Gitaly call duration is at 9s.

Acceptance Criteria

  1. Identify the reason behind the slowness from these types of requests.
  2. Achieve an average duration of < 5s for the endpoint.
Edited by Shane Maglangit