Improve performance of users API under load
The TTFB P90 for the users API is taking longer then the expected 200ms
NAME | RPS | RPS RESULT | TTFB AVG | TTFB P90 | REQ STATUS | RESULT
-------------|-------|--------------------|----------|--------------------|----------------|-----------------
api_v4_users | 200/s | 196.1/s (>80.00/s) | 230.94ms | 269.17ms (<5500ms) | 100.00% (>99%) | Passed¹
This is based on the time to retrieve a full page of 20 users, when changing the pagination to 100 users per page the time slightly increases.
NAME | RPS | RPS RESULT | TTFB AVG | TTFB P90 | REQ STATUS | RESULT
-------------|-------|---------------------|----------|--------------------|----------------|-----------------
api_v4_users | 200/s | 196.34/s (>80.00/s) | 237.27ms | 283.71ms (<5500ms) | 100.00% (>99%) | Passed¹
This was tested against a 10k Reference architecture.
As per our performance targets this endpoint's TTFB metric is above the target of 200 ms which is severity4. Task is to improve the endpoint's performance into next tier.
Steps to reproduce
- Check out the GitLab Performance Tool
- Run the specific test with the
run-k6
command. For example against the 10k environment you would run this following from the project root:./run-k6 -e environments/10k.json -o 60s_200rps.json -t api_v4_users.js
.- You will need an ACCESS_TOKEN for this endpoint as well.
- Ensure you have more than 7 users to start seeing failures.
- If you're seeking to run the test against your own environment the Tool's documentation has details on how to achieve this.