Quick Twitter API Tip: Don’t Make Requests on The Hour
The title says it all, really.
I’m currently running two almost-identical scripts that pull data from the Twitter API every half an hour. The first version of the script runs at :00 and :30 minutes past every hour, and the second version at :05 and :35 minutes past every hour.
The on-the-hour/half-hour script fails (i.e. the API doesn’t respond) about two to three times more often than the 5 minute delayed version. Failed API calls can be identified in the sample screenshot above by 0 values – none of the calls should return a zero value.
So that’s it, really. The most likely reason is that :00 and :30 are peak times for API requests, so you’re more likely to make a request at these times to an overloaded API service. Shift your calls around a bit in the hour, and you’ll get a more robust response. This probably holds true for other APIs too.
A Practical Guide to Web App SuccessWhether you’ve already started to build a web app, or you’re just starting to think about it, A Practical Guide to Web App Success tells you everything you need to know. Over the course of 25 densely-packed chapters, the book guides you through the lean web development process to help you plan, design, build and market a profitable web app quickly and inexpensively.

