Fair share throttling of hosting tickets

XMLWordPrintable

    • CtB - Features

      Bitbucket uses a finite pool of "hosting tickets" to bound the number of concurrent SCM hosting operations (clone, fetch, push) per node, with waiters served strictly FIFO once the pool is full. Under this scheme a single high-traffic repository, for example one that is being clone-bombed by CI, can monopolise the queue, parking requests for other repositories behind a huge queue and degrading the experience for every other user on the node.

      This proposed change moves the queue scheduler from FIFO to "fair share" where waiters are identified by some attribution key (e.g. repository or userId) and when a ticket frees up it is granted to an entity with (for example) the lowest exponentially-weighted recent byte cost, probably also combined with some aging term so that no individual request can be starved indefinitely.

              Assignee:
              Ben Humphreys
              Reporter:
              Ben Humphreys
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: