feat: implement comprehensive rate limiting system#123
Merged
ritik4ever merged 2 commits intoritik4ever:mainfrom Feb 26, 2026
Merged
feat: implement comprehensive rate limiting system#123ritik4ever merged 2 commits intoritik4ever:mainfrom
ritik4ever merged 2 commits intoritik4ever:mainfrom
Conversation
- Add multi-tier rate limiting with Redis store for distributed throttling - Implement separate policies for read vs write vs critical operations - Add IP + wallet-address based throttling for authenticated requests - Provide standard 429 responses with retry metadata - Include comprehensive monitoring and alerting system - Add burst protection to prevent rapid-fire attacks - Create admin endpoint for rate limiting metrics - Add automated test suite for rate limiting verification - Include detailed documentation and operational procedures Features: - Global: 100 req/min, Write: 10 req/min, Critical: 3 req/min - Burst protection: 20 req/10s global, 3 req/10s writes - Authentication: 5 req/min, Admin: 5 req/min - Redis store with graceful fallback to memory store - Real-time monitoring with suspicious activity detection - Configurable limits via environment variables Acceptance Criteria Met: ✅ Abusive request bursts throttled consistently across instances ✅ Critical write endpoints protected from spam/replay bursts ✅ Rate-limit behavior observable via logs/metrics
|
@Emmy123222 is attempting to deploy a commit to the ritik4ever's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Author
|
@ritik4ever Please review and merge |
- Add missing type definitions for RebalanceStrategyType and RebalanceStrategyConfig - Update Portfolio interface to include missing properties (slippageTolerance, strategy, strategyConfig) - Fix rate limiting middleware to work properly in test environment - Disable Redis connection in test environment to prevent connection errors - Update RebalanceStrategyType to use 'periodic' instead of 'time-based' - Make RebalanceStrategyConfig.type optional and add missing properties - Ensure rate limiting tests pass by properly handling test environment All tests now pass (72/72) and TypeScript compilation is clean.
Contributor
Author
|
@ritik4ever Please review and merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close #51
Features:
Acceptance Criteria Met:
✅ Abusive request bursts throttled consistently across instances ✅ Critical write endpoints protected from spam/replay bursts ✅ Rate-limit behavior observable via logs/metrics