Conversation
There was a problem hiding this comment.
Pull request overview
This pull request increases the rate limits for the fetch-updated-data API endpoint, which is called by 11ty during client website rebuilds to fetch the latest Google reviews and business statistics. The endpoint makes external Google API calls and is protected by multiple middleware layers including API key validation, paid access checks, and nested rate limiting.
Changes:
- Increased daily rate limit from 100 to 500 requests (5x increase)
- Increased 5-minute rate limit from 10 to 25 requests (2.5x increase)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| eventType: "fetch_updated_data_5m", | ||
| maxRequests: 10, | ||
| maxRequests: 25, |
There was a problem hiding this comment.
The daily rate limit increase (5x from 100 to 500) is significantly larger than the 5-minute rate limit increase (2.5x from 10 to 25). This changes the ratio between these limits from 10:1 to 20:1.
This means the new limits allow for more sustained, evenly-distributed traffic throughout the day relative to burst traffic. If this is intentional to support a specific use case (e.g., more frequent 11ty rebuilds), consider documenting the rationale. If the increases should be proportional, consider adjusting the 5-minute limit to 50 requests to maintain the 10:1 ratio.
| maxRequests: 25, | |
| maxRequests: 50, |
| { | ||
| eventType: "fetch_updated_data_1d", | ||
| maxRequests: 100, | ||
| maxRequests: 500, |
There was a problem hiding this comment.
This endpoint makes external Google API calls (via updateBusinessReviews and updateBusinessStats) which may have associated costs or quotas. A 5x increase in the daily rate limit could significantly increase API usage and costs. Consider whether this increase aligns with Google API quotas and budget constraints, especially since this endpoint is called by 11ty during client website rebuilds.
No description provided.