Use JSON batching to combine multiple requests into a single batch request.Use webhook notifications rather than polling requests to detect changes (you can also use delta queries to reduce the response payload).Cache data locally where needed to avoid re-fetching data, while being careful not to breach data privacy, retention policies and terms of use of the Microsoft Graph.Increase the value of $top to get larger pages (default is 10 but maximum is 1000).get a page of list items rather than retrieving them individually, and use $select to avoid getting properties you don't need to keep the payload down. Retrieve multiple items in one request, e.g.Don't do automatic retries as these will accumulate requests against any throttling limit. There are a number of strategies you can use: Avoiding ThrottlingĬlearly it is preferable not to be throttled in order to keep your application performant. Obviously you will want your app to wait for the Retry-After period before making another request, otherwise you will just get more 429s and probably extend the throttling period even further. You also get a descriptive Rate-Limit-Reason header (I hesitate to call it an error message) which you probably will want to log rather than show to a user. If your application is throttled you will get a Retry-After response header in addition to the 429 response code, telling you the number of seconds your application needs to wait before making more requests. The reality is that unless you are making a small number of requests, you should design your application on the assumption that you could get a 429 response at any time and build in logic to deal gracefully with that situation when it arises. You might also find you get throttled if you make a large number of requests across your tenant, the 'rules' above notwithstanding. This is all well and good, but for practical purposes you have to accept that these rules could change at any time, and in addition you could well find that a lower threshold kicks in if the service is becoming overloaded for whatever reason. If you are using app-only permissions then that counts as a single user. So you could make 10,000 requests on behalf of each user or group in your tenant in a 10-minute period before triggering the throttle, and if you exceed the threshold for a particular user then it is only that user that gets throttled. This applies on a per-user and per application ID basis. A figure that has been stated publicly is 10,000 requests in a 10-minute period. The answer to this is that you will get throttled if you make a number of requests that would be detrimental to the service as a whole, which isn't actually that helpful. So the obvious question is: what is the definition of "too many requests?". Not all resources are metered and while this initially applied just to the Outlook APIs, we can assume that more resources will be metered over time. If you make too many requests then you will start to get HTTP 429 (too many requests) response codes returned. In addition to dynamic scaling of resources, another mechanism that Microsoft uses is throttling. The infrastructure behind Microsoft 365 will allocate computing resources based on demand to ensure that periods of high traffic levels do not result in degraded performance. The Microsoft Graph endpoint is normally highly performant. The process takes about 15-30 minutes to complete on the tenant, running the diagnostic tests again after this time should come back to say that EWS are not currently throttled.The SharePoint Doctor Home Articles Messages About Contact ☰ Microsoft Graph - Don't Get Throttled! If it has been applied correctly the following screen will be presented. Choose your duration, click acknowlege and click Update Settings. At this stage you can choose either 30, 60 or 90 days for the duration. The tests will come back to say EWS is throttled. In the Need Help? Section type in Increase EWS Throttling policy, the following screen should be presented.Ĭlick on Run Tests and wait for it to complete. To complete, login to the Microsoft 365 admin centre and click on Help (?). Now, Microsoft have made the process simpler and faster by allowing admins to disable EWS throttling from the Microsoft 365 admin centre. A few years ago, this would take about 2-3 days to complete, more recently it is usually completed within 24 hours. The process was to have our customers log a Microsoft Premier Support case and it would then be completed in the back-end by MS engineers. This allows migrations to run at speed, without disabling throttling, migrations run at about 80% less throughput. One of the processes we need to complete when running migrations of archive data to Microsoft 365 mailboxes is to disable Exchange Web Services (EWS) throttling.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |