β‘ API Rate Limits
Comprehensive guide to SolveForce API rate limiting policies, best practices, and optimization strategies.
π― Overview
SolveForce implements intelligent rate limiting to ensure:
- Fair Usage: Equitable access for all API consumers
- System Stability: Protection against abuse and overload
- Optimal Performance: Consistent response times for all users
- Scalable Growth: Support for increasing API demand
π Rate Limit Tiers
Developer Plan
Perfect for testing and small applications
- Requests per Hour: 1,000
- Burst Capacity: 100 requests in 60 seconds
- Concurrent Requests: 10
- Monthly Included: 50,000 requests
- Overage Rate: $0.001 per request
Business Plan
Ideal for production applications
- Requests per Hour: 10,000
- Burst Capacity: 500 requests in 60 seconds
- Concurrent Requests: 50
- Monthly Included: 500,000 requests
- Overage Rate: $0.0008 per request
Enterprise Plan
For high-volume enterprise usage
- Requests per Hour: 100,000
- Burst Capacity: 2,000 requests in 60 seconds
- Concurrent Requests: 200
- Monthly Included: 5,000,000 requests
- Overage Rate: $0.0005 per request
Custom Plans
Tailored for specific needs
- Requests per Hour: Unlimited*
- Burst Capacity: Customizable
- Concurrent Requests: Customizable
- Monthly Included: Custom allowances
- Pricing: Volume-based discounting
*Subject to fair usage policies
π Rate Limit Headers
Every API response includes rate limit information:
HTTP/1.1 200 OK
X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 9987
X-RateLimit-Reset: 1635724800
X-RateLimit-Burst: 500
X-RateLimit-Burst-Remaining: 495
X-RateLimit-Retry-After: 3600
Content-Type: application/json
Header Descriptions
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed per hour |
X-RateLimit-Remaining | Requests remaining in current window |
X-RateLimit-Reset | Unix timestamp when rate limit resets |
X-RateLimit-Burst | Maximum burst requests per minute |
X-RateLimit-Burst-Remaining | Burst requests remaining |
X-RateLimit-Retry-After | Seconds to wait before next request |
β οΈ Rate Limit Exceeded Response
When rate limits are exceeded, you'll receive a 429 Too Many Requests response:
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please wait before making more requests.",
"details": {
"limit": 10000,
"remaining": 0,
"reset_time": "2025-01-15T14:00:00Z",
"retry_after": 3600,
"current_usage": 10000
},
"request_id": "req_rate_limit_123"
}
}
ποΈ Service-Specific Limits
Critical Operations
Some endpoints have stricter limits due to resource intensity:
| Service Category | Specific Limits |
|---|---|
| Billing Operations | 100 requests/hour |
| Service Provisioning | 50 requests/hour |
| Large Data Exports | 10 requests/hour |
| Account Management | 200 requests/hour |
Read vs Write Operations
| Operation Type | Rate Multiplier |
|---|---|
| GET (Read) | 1x standard rate |
| POST (Create) | 2x rate consumption |
| PUT (Update) | 2x rate consumption |
| DELETE | 3x rate consumption |
π Rate Limit Optimization
Best Practices
1. Implement Exponential Backoff
import time
import random
def api_call_with_backoff(api_function, max_retries=5):
for attempt in range(max_retries):
try:
response = api_function()
if response.status_code == 429:
# Get retry-after header
retry_after = int(response.headers.get('X-RateLimit-Retry-After', 60))
# Add jitter to prevent thundering herd
jitter = random.uniform(0.5, 1.5)
sleep_time = (2 ** attempt) * jitter
time.sleep(min(sleep_time, retry_after))
continue
return response
except Exception as e:
if attempt == max_retries - 1:
raise e
2. Monitor Rate Limit Headers
def check_rate_limits(response):
remaining = int(response.headers.get('X-RateLimit-Remaining', 0))
reset_time = int(response.headers.get('X-RateLimit-Reset', 0))
if remaining < 100: # Less than 100 requests remaining
current_time = time.time()
sleep_time = reset_time - current_time
if sleep_time > 0:
print(f"Rate limit low. Sleeping for {sleep_time} seconds.")
time.sleep(sleep_time)
3. Batch Operations
# Instead of multiple single requests
for item in items:
api.create_item(item)
# Use batch operations
api.create_items_batch(items)
4. Use Webhooks for Real-time Updates
Instead of polling for changes, use webhooks to receive notifications:
# Avoid frequent polling
while True:
status = api.get_service_status()
time.sleep(30) # Wastes rate limits
# Use webhooks instead
@webhook_handler('/service-status-update')
def handle_status_update(data):
# Process status update
pass
Caching Strategies
1. Response Caching
from functools import lru_cache
import time
@lru_cache(maxsize=100)
def get_account_info(account_id, cache_timestamp):
return api.get_account(account_id)
# Use with 5-minute cache
cache_key = int(time.time() // 300) # 5-minute buckets
account = get_account_info("acc_123", cache_key)
2. ETag Support
def get_with_etag(endpoint, etag=None):
headers = {}
if etag:
headers['If-None-Match'] = etag
response = api.get(endpoint, headers=headers)
if response.status_code == 304: # Not Modified
return cached_data # Use cached version
return response.json()
π Rate Limit Monitoring
Real-time Monitoring Dashboard
Access your rate limit usage at: https://dashboard.solveforce.com/api/rate-limits
Monitoring Metrics
- Current Usage: Real-time request consumption
- Usage Trends: Historical usage patterns
- Peak Times: Identify high-usage periods
- Limit Approaches: Alerts when approaching limits
API Monitoring Endpoint
GET /api/v1/monitoring/rate-limits
Response:
{
"current_usage": {
"requests_this_hour": 2450,
"hourly_limit": 10000,
"burst_used": 12,
"burst_limit": 500
},
"usage_history": [
{
"hour": "2025-01-15T13:00:00Z",
"requests": 2450,
"percentage": 24.5
}
],
"projected_usage": {
"end_of_hour": 3200,
"risk_level": "low"
}
}
ποΈ Dynamic Rate Limiting
Intelligent Scaling
SolveForce implements dynamic rate limiting that:
- Adapts to Usage Patterns: Higher limits during your peak hours
- Rewards Good Behavior: Increased limits for well-behaved applications
- Prevents Abuse: Automatic detection and mitigation of abuse patterns
- Seasonal Adjustments: Rate limits adjust for business cycles
Request Priority System
Different request types have different priorities:
| Priority Level | Description | Queue Position |
|---|---|---|
| Critical | Service outages, security issues | Front of queue |
| High | Billing, account management | High priority |
| Normal | Standard API operations | Standard queue |
| Low | Bulk operations, reports | Background processing |
π οΈ Tools and SDKs
Official SDKs with Rate Limit Handling
Python SDK
from solveforce import SolveForceAPI
client = SolveForceAPI(
api_key="your_key",
auto_retry=True,
max_retries=3,
respect_rate_limits=True
)
# Automatic rate limit handling
response = client.accounts.list()
JavaScript SDK
const SolveForce = require('@solveforce/api');
const client = new SolveForce({
apiKey: 'your_key',
autoRetry: true,
respectRateLimits: true,
retryDelay: 'exponential'
});
Rate Limit Testing Tools
CLI Tool
# Install rate limit tester
npm install -g @solveforce/rate-limit-tester
# Test your rate limits
sf-rate-test --endpoint "/api/v1/accounts" --concurrency 10
π¨ Rate Limit Violations
Violation Types
| Violation | Description | Consequence |
|---|---|---|
| Soft Limit | Exceeded hourly rate | Temporary throttling |
| Hard Limit | Excessive burst requests | 5-minute suspension |
| Abuse Pattern | Consistent violations | Account review |
Appeal Process
If you believe your account was incorrectly limited:
- Contact Support: api-support@solveforce.com
- Provide Details: Request IDs, timestamps, usage patterns
- Review Timeline: 24-48 hours for resolution
- Account Restoration: Automatic once resolved
π‘ Rate Limit Increase Requests
Temporary Increases
For special events or launches:
- Request Window: 72 hours advance notice
- Duration: Up to 30 days
- Approval: Automatic for existing customers
- Cost: No additional charges for reasonable increases
Permanent Increases
For growing applications:
- Upgrade Plans: Automatic with plan upgrades
- Custom Limits: Available for enterprise customers
- Volume Discounts: Reduced per-request costs at scale
- SLA Guarantees: Enhanced SLAs with higher tiers
π Support and Resources
Getting Help
- Documentation: Complete rate limit guide at docs.solveforce.com
- Support Email: api-support@solveforce.com
- Phone Support: (888) 765-8301 ext. API
- Community Forum: community.solveforce.com
- Status Page: status.solveforce.com
Additional Resources
- Rate Limit Calculator: Calculate optimal limits for your use case
- Best Practices Guide: Comprehensive optimization strategies
- SDK Documentation: Language-specific implementation guides
- Monitoring Tools: Real-time rate limit monitoring solutions
Need higher rate limits or custom rate limiting solutions? Contact our API team at (888) 765-8301 to discuss your requirements.
Optimize your API usage with SolveForce's intelligent rate limiting system.