-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: added configurable rate limiting system #205
Conversation
Reviewer's Guide by SourceryThis pull request implements a configurable rate limiting system within the Docker Compose environment. The changes include adding HTTP 429 error responses for rate limiting cases, implementing a global rate limit for Blizzard API calls, and adding a reverse proxy container for testing in a production-like environment. The implementation involves modifications to various files to handle rate limiting logic, update configurations, and add new test cases. Updated class diagram for rate limiting systemclassDiagram
class CacheManager {
+is_being_rate_limited() bool
+get_global_rate_limit_remaining_time() int
+set_global_rate_limit() void
}
class Settings {
+blizzard_rate_limit_key: str
+blizzard_rate_limit_retry_after: int
+rate_limit_per_second_per_ip: int
+rate_limit_per_ip_burst: int
+max_connections_per_ip: int
}
class RateLimitErrorMessage {
+error: str
}
class HTTPException {
+status_code: int
+detail: str
+headers: dict
}
CacheManager --> Settings : uses
RateLimitErrorMessage --> HTTPException : extends
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @TeKrop - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟡 Testing: 2 issues found
- 🟡 Complexity: 1 issue found
- 🟡 Documentation: 1 issue found
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
00e6fb0
to
1f44e4b
Compare
|
Features
Misc
reverse-proxy
container in compose to test the API in production-like environmentSummary by Sourcery
Implement a configurable rate limiting system to manage API request rates and prevent excessive calls, with HTTP 429 errors for violations. Enhance the Docker Compose setup with a reverse-proxy for testing, and update documentation and tests to support these changes.
New Features:
Enhancements:
Build:
Documentation:
Tests: