Skip to content

Rate limit project imports

Aishwarya Subramanian requested to merge rate-limit-imports into master

What does this MR do?

This MR adds a rate limiter for project imports. The throttle is applied if a user tries importing more than 30 requests in 10 minutes.

The threshold value is based on the import trend. Based on the data collected for 3rd, 6th and 7th January, 2020:

Average number of imports requested in 10 minutes for each import type:

Screen_Shot_2020-01-14_at_4.10.59_PM

Maximum number of imports requested in 10 minutes for each import type:

Screen_Shot_2020-01-14_at_3.54.01_PM

Import Frequency:

Screen_Shot_2020-01-14_at_3.58.23_PM

Out of total 1336 samples, 1306 of them make <= 30 requests in 10minutes.

Data: https://docs.google.com/spreadsheets/d/1seME9c26KLP1ju3vDL27Q3o5sumMnKRDWR8Mw650Xxc

Having this threshold should therefore not have any destructing effects.

Please note I'll be adding the rate limiter for the Import API in another MR.

Mentions https://gitlab.com/gitlab-org/gitlab/issues/103447

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports