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
I was using this library(Redis module) and really wanted to use it to dynamically rate limit APIs at runtime. But looking at the code it appears like limit rule is bound to instance created by the factory. So to make it to work dynamically, I need to create a new instance with new limit rule.
Is my understanding correct or is there a way to change limit rule on the instance already created?
The text was updated successfully, but these errors were encountered:
My understanding is that while more strenuous on the garbage collector, you can create new objects via the factory when the configuration changes.
I would recommend storing some synchronized RequestRateLimiters in a client class, and only creating new objects when a separate monitoring thread receives a change.
I was using this library(Redis module) and really wanted to use it to dynamically rate limit APIs at runtime. But looking at the code it appears like limit rule is bound to instance created by the factory. So to make it to work dynamically, I need to create a new instance with new limit rule.
Is my understanding correct or is there a way to change limit rule on the instance already created?
The text was updated successfully, but these errors were encountered: