edx-rest-api-client icon indicating copy to clipboard operation
edx-rest-api-client copied to clipboard

Ideas for improving resiliency of the client

Open robrap opened this issue 1 year ago • 3 comments

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.

robrap avatar Sep 13 '23 16:09 robrap

@johnnagro: Did you say there is enterprise code that might be lifted for some of this?

robrap avatar Sep 13 '23 16:09 robrap

[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.

robrap avatar Sep 19 '23 13:09 robrap

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.

robrap avatar Sep 19 '23 13:09 robrap