Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When the leader receives the fetch request it processes the partitions in the defined order, up to the response's size limit. If the inclusion of a partition, listed in the leader's throttled-replicas list, causes the LeaderQuotaRate to be exceeded, that partition is omitted from the response (aka returns 0 bytes). Logically, this is of the form:

if (throttled(partition))
   var bytesAllowedForThrottledPartitionincludedInFetchResponse: Boolean = quota.recordAndMaybeAdjustrecordAndEvaluate(bytesRequestedForPartition) 

...

We also considered a more pessimistic approach which quota's the follower's fetch request, then applies an adjustment when the response returns. This mechanism has some advantages, most notably it is conservative, meaning the throttle value will never be exceeded. However, whilst this approach should work, the adjustment process adds some complexity when compared to the optimistic approaches. Thus this proposal was rejected (This is discussed in full here).