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

Basic rate limiting functionality #2300

Closed
wants to merge 11 commits into from

Conversation

toby-griffiths
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? not yet
Fixed tickets n/a
License MIT
Doc PR api-platform/docs#637

I've started working on a rate limiter of the API & thought I'd share. It's not quite finished yet, but I'd appreciate feedback whilst I complete the work to add request specific rate limits, and maybe a central cache storage engine.

@dunglas
Copy link
Member

dunglas commented Nov 5, 2018

Hi @toby-griffiths and thanks for your contrib. Are you aware of https://github.com/IndraGunawan/api-rate-limit-bundle? Do you think there are any room for collaboration with @IndraGunawan here?

@toby-griffiths
Copy link
Contributor Author

@dunglas No, I wasn't aware. I see that that has a few more features, but looks like it would not handle race conditions so well. I'll have a chat with @IndraGunawan about updating it.
I'm assuming you'd rather have this as a separate bundle, rather than integrating into the core?

@SCIF
Copy link

SCIF commented Feb 15, 2019

Hi @toby-griffiths , could you get some update on this PR?

@toby-griffiths
Copy link
Contributor Author

@SCIF After @dunglas 's comment, I decided it's probably better to support the existing bundle, but I've got to find time to update that bundle with handling of race conditions

@antograssiot
Copy link
Contributor

Thanks @toby-griffiths

I decided it's probably better to support the existing bundle

I think it is better too indeed
Closing then

@norkunas
Copy link
Contributor

Maybe this could be reconsidered? As it's not possible to configure rate limits per operation on resource without custom workarounds. Also that Symfony has a RateLimiter component it'd be not that hard to integrate this to core and also properly expose headers to api documentation.

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

Successfully merging this pull request may close these issues.

5 participants