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

Add SimBrief Rate Limiting #1915

Merged
merged 4 commits into from
Dec 21, 2024
Merged

Conversation

arthurpar06
Copy link
Contributor

This code limits the number of requests to the route to 10 per minute. Once this limit is exceeded, requests are blocked, but the block only lasts for one or two minutes, so users are not locked out for several hours.

Additionally, the SimBrief code (frontend) has been updated to avoid sending more than 5 requests, with a delay of 1500ms between each request. This allows us to smooth out the requests we send afterward.

Example below:
You can see that I triggered the rate limiter, received 429 errors, then got the popup notifying me of a problem. If I regenerate about a minute later, I get a 200 status, and the generation works.

image

image

@nabeelio
Copy link
Member

Thanks!!

@nabeelio nabeelio merged commit 4b05a47 into phpvms:dev Dec 21, 2024
7 checks passed
@arthurpar06 arthurpar06 deleted the addSimBriefRateLimiting branch January 2, 2025 20:08
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

Successfully merging this pull request may close these issues.

2 participants