0
votes

I am currently testing throttling in my application. Some requests I make to the Graph-API use the Batch endpoint.

I know from the documentation that currently for the outlook enpoint the throttling limit is 10K requests every 10 minutes per app per user (exchange doc & blog).

To produce a throttling scenario I did send too many Requests (>10.000) to:

/v1.0/users/{a_userId}/contacts/{a_contactId}/

-> as expected all further operations on the outlook resource were throttled (get calendar, get contacs, ...)

But when I did send a batch request, all requests to the outlook endpoint were successfully executed

Example request:

POST https://graph.microsoft.com/v1.0/$batch
{
  "requests": [
    {
      "id": "1",
      "method": "GET",
      "url": "/users/{a_userId}/contacts/{a_contactId}/"
    }
    // ... some more request items
  ]
}

I did use the same User and App in both tests.
It seems that there is a different throttling behavior for the batch enpoint.

The documentation did not specify any/different behavior for batch-requests. So my question is, how will throttling behave on the this enpoint? Especially the limits are important.

E.g. If I send too many requests to the outlook endpoint over batching, will just the requests to outlook endpoint be throttled or will the whole batch endpoint be throttled (every batch-request-item to any resource throttled even if it is a request to another resource e.g. onedrive)?

Edit:

My problem here is that I was throttled when accessing the resource directly but doing the same request over the batch endpoint did work.

Due to the lack of documentation for throttling on the Batch-enpoint I assumed Throttling is only "counted" once per resource no matter in which way I access it. But I was only throttled when directly accessing the resource. Thus I am unsure about the excact throttling behavior of the Batch enpoint.

Is Throttling counted separately depending over which enpoint I do my requests?
E.g. would this be correct to assume for Exchange resources:
limit 10k/10min by directly request
plus 10k/10min by request over batch
resulting theoretically possible 20k/10min requests?

1

1 Answers

1
votes

The 10k/10 minutes throttling limit is specific to Exchange resources (mailboxes, groups, etc...). Unfortunately we have not had a "meeting of the minds" across other products such as OneDrive/Sharepoint and therefore they currently have their own throttling limits. Our are better :P (j/k).

So to answer your question, Exchange resources are throttled separately than other workloads. If you are throttled accessing an Exchange mailbox, you will not automatically be throttled for OneDrive requests. But this actually makes sense. Even in Exchange, your throttling is a function of your a AppId + target mailbox. So if you access Mailbox A and get throttled, you are not throttled accessing Mailbox B, even with the same app. So you can think of OneDrive as just another target.