You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Find a way to make our client code respect these rate limits. Other people probably already solved this problem in Spring Boot apps so make sure to spend some time to investigate existing solutions instead of diving directly in code.
Resilience4j optional. Maybe as a separate ticket.
Initial idea is the following. The number of requests we can do is relative to a specific time-frame this means we have a max req/min. Knowing what the limit req/min is I can now create a interceptor that will check if we are making more or less requests compared to the max req/min. If we do end up making more then the max what the interceptor will do is influence the rate at which cache eviction is being done. All cache eviction is on a schedule that is specified by each cache themselves but it is dependent on a multiplier which is the thing the interceptor changes. If the interceptor deems that there are too many requests being made then it will set this multiplier higher meaning less requests are being made. Otherwise it will drop it until reaching 1 where the cache eviction is being done on the default schedule. Some things to consider here are:
If the number of remaining requests drops too low have a scale according to which certain requests will be stopped entirely.
As mentioned above don't make the requesting happen at a faster speed then the default.
Activity
tomellm commentedon May 21, 2024
consider how the rate limiting is tied to different tokes, meaning is it bound to the installation token or the app or whatever
tomellm commentedon May 21, 2024
Initial idea is the following. The number of requests we can do is relative to a specific time-frame this means we have a max
req/min. Knowing what the limitreq/minis I can now create a interceptor that will check if we are making more or less requests compared to the maxreq/min. If we do end up making more then the max what the interceptor will do is influence the rate at which cache eviction is being done. All cache eviction is on a schedule that is specified by each cache themselves but it is dependent on a multiplier which is the thing the interceptor changes. If the interceptor deems that there are too many requests being made then it will set this multiplier higher meaning less requests are being made. Otherwise it will drop it until reaching 1 where the cache eviction is being done on the default schedule. Some things to consider here are:#128 added ratelimiting
#128 added ratelimiting
#128 added ratelimiting
#128 added ratelimiting
#128 added ratelimiting (#145)