Rate limits #287
Replies: 1 comment
-
Hello! 👋 It's a great topic, and one that has been on my mind as well. First off, if you do However, the reason that isn't the default is because when you're running a build you probably want to avoid stale data. And if you're restarting the dev server, you may want to make sure there is fresh HTTP data. There is a So that's a whole lot of different semantics to keep in mind. I'm still exploring the best abstractions and design choices to equip users with the right tools to navigate these things intuitively and effectively. Conditional HTTP RequestsWeb browsers use the concept of Conditional HTTP requests to cache requests based on certain HTTP headers. For example, if the browser receives an Some APIs, like GitHub's for example, will not count HTTP 304 responses against your rate limit, which is a win-win (better performance for both parties).
ChallengesI have a few design questions that I need clarity on before implementing conditional HTTP requests in
Those are some of the questions I'm thinking through right now. Any thoughts, or related use cases, are welcome! I know it's a lot of questions, but hopefully that gets the ball rolling a bit to start turning these ideas into something actionable. |
Beta Was this translation helpful? Give feedback.
-
Hello! I'm working on a simple static site backed by a single Google Sheet. There's around 600 rows to this sheet. I fetch a single row for each page of the application, and the full sheet for a few filter/search pages. I've had great success with this approach, but it's now breaking down due to rate limits after transitioning to one row per detail page.
The Sheets API allows a maximum of 300 requests per minute, and since I have no way to tune
elm-pages build
, I have no way of slowing this build down to deal with rate limits. I could split the sheet between two accounts or do some kind of exponential back-off retry... but I'm not sure ifelm-pages build
will pick back up where it left off or retry the already successful 300 pages.Any suggestions here? I'm open to new approaches in design as well.
Beta Was this translation helpful? Give feedback.
All reactions