Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-19807

Treat separate repository http access tokens as different users in rate limiting

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Rate Limiting
    • None
    • 1
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      We have two http access tokens in a repository. We assumed that each token would receive it's own rate limiting bucket and that different tokens in a specific repository would not step on each other. However, while investigating why one script was receiving 429s, we discovered that the tokens are identified and handled by rate limiting per token scope.

      As an example, the tokens appear to be a user "access-token-user/2/1" or "access-token-user/1/1".

      Broken down, this scoping appears to be an composite of the following details:

      • Key type: access-token-user == HTTP Access Token, access-key-user == SSH Key
      • Key scope: 1 == Project level, 2 == Repository level
      • Source identifier: Either the Project ID or the Repository ID

      So this means that multiple keys are grouped together, at least as far as rate-limiting is concerned. 

      • Multiple SSH keys defined at a Project level with a Project ID of 5 would result in a combined rate-limited identity of "access-key-user/1/5".
      • Multiple HTTP keys defined at a Repository level with a Repository ID of 299 would result in a combined rate-limited identity of "access-token-user/2/299".

      We assume that each token would be bucketed separately and we'd like to formally ask for Bitbucket's rate-limiting to NOT group keys up by identity like this. 

              Unassigned Unassigned
              fe556f1d097e Steven Behnke
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: