edx-rest-api-client
edx-rest-api-client copied to clipboard
Ideas for improving resiliency of the client
It seems like it would be useful for the client to have additional resiliency capabilities such as retries, exponential backoff, auto-handling of rate limiting, circuit breaker, etc. that would both protect the caller and callee, both of which would be useful to prevent common situations where services fall like dominoes (e.g. Discovery, then LMS).
Each idea could be ticketed separately.
@johnnagro: Did you say there is enterprise code that might be lifted for some of this?
[inform] From DRF throttling docs:
If the .wait() method is implemented and the request is throttled, then a Retry-After header will be included in the response.
It's unclear to if a custom throttle is required to get this behavior. However, it is possible, and would allow clients to call as efficiently as possible when throttled.
Clients should be using timeouts. See docstring. Do we need to improve docs (move from README to how-to?) and/or add linting? See README docs.