Polykey icon indicating copy to clipboard operation
Polykey copied to clipboard

Optimise the performance of IdPs

Open joshuakarp opened this issue 3 years ago • 0 comments

Created by @CMCDragonkai

The following discussion from !141 should be addressed:

  • [ ] @CMCDragonkai started a discussion: (+2 comments)

    Need to keep a note here regarding API limits and performance optimisation of the providers.

    • https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting
    • https://docs.github.com/en/rest/overview/resources-in-the-rest-api#conditional-requests

    There's a 5K API request per hour limit shared across all oauth2 apps on a particualar user. We can keep track of the limits as well. So when we get throttled we understand we cannot contact the provider API. This should be presented to the user to prevent frustration.

So basically:

  1. Resource caching
  2. Rate limit tracking
  3. Conditional requests (based on resource caching)

should all be applied where we can do so.

joshuakarp avatar May 27 '21 23:05 joshuakarp