in reply to Throttling while using LWP for MS Graph request?
Does LWP handle throttling on its own?
No, it has no hidden, automated throttling. That would break the principle of least surprise.
The school I work for
Schools (and similar institutions) often have draconian and perplexing network policies. Don't trust them not to mess with your traffic.
According to MS documentation on this I should receive a return code of 429 on being throttled.
In your shoes I would not trust MS any more than the school.
Your code looks OK on first glance, if not entirely idiomatic. What I would recommend is taking all the bits which are not specific to the endpoint, copy them out to a different script/application and run them against a solid, reliable 3rd-party API from a client which is not within the school network (eg. from your own office or even from a cloud server). That should convince you one way or the other than your generalised API client itself is solid.
Assuming that your client passes the above tests you can then simply allow for the fact that either the school or the MS service (or both) is causing the issue. You could debug this if you have great patience, or you could just handle those occurrences where the responses are not what you expect by binning them and re-requesting them. Having had to deal with both schools and MS in the past I would opt for the latter.
Best of luck.
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Throttling while using LWP for MS Graph request?
by PeterKaagman (Beadle) on May 14, 2024 at 10:28 UTC |