Extend member listing rate limits to remaining read endpoints

What does this MR do and why?

Adds per-user limits to the member listing and member lookup endpoints in the REST API, for groups and projects:

Limit Endpoints Key
2,000 per minute GET /groups/:id/members, GET /projects/:id/members member_list_api
1,000 per minute GET /groups/:id/members/:user_id, GET /groups/:id/members/all/:user_id, GET /projects/:id/members/:user_id, GET /projects/:id/members/all/:user_id member_lookup_api

Both keys use log mode (staged_rule): while the member_read_rate_limit feature flag is disabled, which is the default, requests over the limit are counted and logged but not blocked. Enabling the flag enforces them. GET :id/members/all keeps its existing, configurable project_members_api limit and does not share a counter with GET :id/members.

The values come from production traffic on 2026-11-24, counted per user or IP address per minute in ten 10-minute samples (100 minutes). At these limits, 3 users or IPs went over on listing and 5 on lookup in those windows. At the earlier values, lookup at 400 had 12 over in the same windows, and listing sharing the 200 per minute project_members_api counter had 144 over in a separate 110-minute sample from the same day.

On GitLab.com, authenticated API traffic is already limited to 2,000 requests per minute per user, so the listing limit mostly matters for GitLab Self-Managed and GitLab Dedicated, where those limits are off by default. On 2026-11-30, 12:00–15:00 UTC, the only user over 2,000 per minute on listing got no 429 from the global limit, so they're on the bypass header or the user allowlist. The bypass header skips this rule too.

References

  • Rollout issue: #635779
  • Closes #635738

Screenshots or screen recordings

Not applicable, there are no UI changes.

How to set up and validate locally

  1. In the Rails console, enable the feature flag:

    Feature.enable(:member_read_rate_limit)
  2. As a user with access, list members (GET /api/v4/groups/:id/members) more than 2,000 times in a minute.

  3. Confirm that requests over the limit receive a 429 response.

  4. Disable the feature flag and confirm the requests are no longer blocked. Requests over the limit are only logged:

    Feature.disable(:member_read_rate_limit)

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

Edited by Shubham Kumar

Merge request reports

Loading
Loading