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

Merge v1.0.0-rc2: Leaky Bucket Algorithm, Version Retractions, and Enhanced Testing Suite #18

Merged
merged 17 commits into from
Nov 23, 2024

Conversation

neelp03
Copy link
Owner

@neelp03 neelp03 commented Oct 29, 2024

Description

This PR merges v1.0.0-rc2 into the main branch, bringing several key improvements and retractions for enhanced performance and usability in ThrottleX.

  • Added a Leaky Bucket Rate-Limiting Algorithm with concurrency handling and optimized bucket cleanup to manage high-throughput scenarios more efficiently.
  • Implemented Version Retractions for v1.0.0 and v1.0.1, marking them as unavailable due to planned structural updates.
  • Enhanced Testing Suite with full unit tests for rate-limiting policies, focusing on concurrency and edge cases to ensure stability.

Fixes #12 #14 #15 #16 #10

Type of Change

  • 🚀 New feature (non-breaking change which adds functionality)
  • 🧹 Chore (maintenance, dependencies, etc.)
  • 📖 Documentation update

Checklist

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have checked my code and corrected any misspellings.
  • Any dependent changes have been merged and published in downstream modules.

Additional Information

This pre-release update improves rate-limiting flexibility and prepares the project for scaling with load balancer integration and other optimizations. Feedback on v1.0.0-rc2 is encouraged to prepare for the final release.

Copy link

codecov bot commented Oct 29, 2024

Codecov Report

Attention: Patch coverage is 72.82913% with 97 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ratelimiter/leaky_bucket.go 55.91% 33 Missing and 8 partials ⚠️
ratelimiter/concurrency.go 56.16% 27 Missing and 5 partials ⚠️
store/redis.go 69.84% 13 Missing and 6 partials ⚠️
ratelimiter/token_bucket.go 25.00% 2 Missing and 1 partial ⚠️
ratelimiter/utils.go 93.75% 1 Missing ⚠️
store/memory.go 98.78% 1 Missing ⚠️
Flag Coverage Δ
unittests 73.91% <72.82%> (+3.72%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
ratelimiter/fixed_window.go 82.85% <100.00%> (-3.19%) ⬇️
ratelimiter/ratelimiter.go 100.00% <100.00%> (ø)
ratelimiter/sliding_window.go 95.83% <100.00%> (+41.28%) ⬆️
ratelimiter/utils.go 93.75% <93.75%> (ø)
store/memory.go 99.02% <98.78%> (+9.12%) ⬆️
ratelimiter/token_bucket.go 62.36% <25.00%> (-2.53%) ⬇️
store/redis.go 66.44% <69.84%> (+8.37%) ⬆️
ratelimiter/concurrency.go 56.16% <56.16%> (ø)
ratelimiter/leaky_bucket.go 55.91% <55.91%> (ø)

🚨 Try these New Features:

@neelp03 neelp03 merged commit 0b84caa into main Nov 23, 2024
2 checks passed
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.

Implement Leaky Bucket Rate Limiting Algorithm
1 participant