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
To protect a web app against abusive connections / requests (sub DDOS scale) several layers can help (nginx, middleware), but stumbling on Rails future rate limiting , I'm quite jealous of the elegant DX of this solution.
I could clearly see this working in Lucky :
classSignIns::New < BrowserActionincludeAuth::RedirectSignedInUsers
rate_limit to:50, within:10.seconds
get "/sign_in"do
html NewPage, operation:SignInUser.new
endend
I can't implement this right now, I'm just putting it out there as a starting point for discussion / inspiration.
The text was updated successfully, but these errors were encountered:
Yeah, I dig it. I think rails has an easy way to handle it with having their key/value store built-in now. I wonder how this would scale with postgres backed. Or would this feature require redis to be added in?
It would require implementing new store(s) for lucky_cache (redis for example). Caching for Avram might also benefit from it.
With a redis store added to lucky_cache, a dependency on a redis shard would be added (not an issue for redis-less users if the redis store is not used).
Again, I can't do the work right now, just putting down ideas :-)
Include the module and write a rate_limit method to define the limit.
The rate_limit_key method can be overridden if you want differeny key
logic.
Ref luckyframework#1865
russ
linked a pull request
Oct 6, 2024
that will
close
this issue
To protect a web app against abusive connections / requests (sub DDOS scale) several layers can help (nginx, middleware), but stumbling on Rails future rate limiting , I'm quite jealous of the elegant DX of this solution.
I could clearly see this working in Lucky :
I can't implement this right now, I'm just putting it out there as a starting point for discussion / inspiration.
The text was updated successfully, but these errors were encountered: