Add enhanced concurrency patterns, rate limiting, market management, and pipeline processing
This commit is contained in:
26
@prompts/rate-limiting.md
Normal file
26
@prompts/rate-limiting.md
Normal file
@@ -0,0 +1,26 @@
|
||||
You are an expert in rate limiting and resource management for distributed systems. I'm building an MEV bot that needs to efficiently manage requests to multiple RPC endpoints with different rate limits.
|
||||
|
||||
I need help with:
|
||||
|
||||
1. Implementing adaptive rate limiting that adjusts to endpoint capacity
|
||||
2. Creating a rate limiter manager for multiple endpoints
|
||||
3. Handling rate limit errors gracefully with fallback strategies
|
||||
4. Implementing retry mechanisms with exponential backoff
|
||||
5. Monitoring and adjusting rate limits based on observed performance
|
||||
6. Balancing load across multiple endpoints
|
||||
7. Handling different rate limit types (RPS, concurrent requests, etc.)
|
||||
8. Implementing circuit breakers for failed endpoints
|
||||
|
||||
Please provide production-ready Go code that:
|
||||
- Implements efficient rate limiting for multiple endpoints
|
||||
- Handles errors gracefully
|
||||
- Follows Go best practices
|
||||
- Includes comprehensive comments explaining the rate limiting strategies
|
||||
- Provides metrics for monitoring rate limit usage
|
||||
|
||||
The code should:
|
||||
- Respect rate limits for all endpoints
|
||||
- Automatically adjust to endpoint capacity
|
||||
- Handle rate limit errors gracefully
|
||||
- Provide clear metrics for monitoring
|
||||
- Include benchmarks for critical functions
|
||||
Reference in New Issue
Block a user