Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throttle #4

Open
oscarotero opened this issue Jan 18, 2017 · 5 comments
Open

Throttle #4

oscarotero opened this issue Jan 18, 2017 · 5 comments

Comments

@oscarotero
Copy link
Member

oscarotero commented Jan 18, 2017

Middleware for limiting how often individual user can make requests or execute any action. Like #3 it brings some challenges: how to manage the data (session, database, etc...)

Some referencies:

@mav2287
Copy link

mav2287 commented Apr 14, 2021

This is something I will most likely want to pickup and work on as well. Not sure at what point I will get to it, but I noticed the references listed are pretty outdated and the first two seem abandoned with the third not getting a lot of activity. I can start looking at what is out there, but wanted to see if you have any others you like or think would work well?

@oscarotero
Copy link
Member Author

I don't have more references. The main challenge here is building something easy to use and, at the same time, flexible enough for any casuistry. There's no a psr standard for data session, and there are several ways to handle this data, so this middleware should be highly cusomizable, but this makes it hard to use.

@mav2287
Copy link

mav2287 commented Apr 14, 2021

No worries wasn't sure how far you got with it. I was also thinking that this might be difficult to make simple to use.

At a high level a global throttle needs at very least some kind of persistent storage like a database or file to be able to keep track requests. A user specific one needs that plus a way to identify that specific user, from a security standpoint that can tricky since bots and hackers will IP hop and do everything they can to look like a different user for each request. I'm not sure if there is a PSR spec for tagging requests from an authenticated user. If there is that might make that part just a little easier.

@Ilgrim
Copy link

Ilgrim commented Apr 23, 2021

Anybody is working on this? I am interested in this topic.

@mav2287
Copy link

mav2287 commented Apr 25, 2021

I have looked at it, but didn't see a clear way to make this fit with the other middlewares.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants