[twitter-dev] Rate Limiting question

2010-01-01 Thread jojet
Hi all,
I was feeling a little clever after working on some Twitter API stuff
but then thought oh! I'd better think about Twitters rate
limiting...and then that's where my brain started to melt!

A few bits of info: my web app needs people to authenticate (OAUTH)
and, from then on, the app analyses their tweets and occasionally
updates registered user's statuses.

I've applied for the webserver IP to be white listed which I believe
gives the app 20,000 requests per hour.

I've not found the search API to be great when looking for a hashtag
(sometimes tweets just don't seem to get indexed) so I've gone a stage
further and am analysing the individual timelines of all my registered
users via a cron job (the cron job sucks in all of a persons tweets
greater than the last analysed tweet of the user). This call is made
via OAUTH/authenticated so I believe such a call depletes the user's
rate limit quota rather than the IP/authenticated account of the
webserver quota? Is that correct?

Thanks for any thoughts here

Joel








Re: [twitter-dev] Rate Limiting question

2010-01-01 Thread John Kalucki
For the first use case, following many users' timelines, you should be
using the follow method on the Streaming API. Currently you cannot get
protected and low quality user statuses this way, but you can get the
vast majority of tweets this way. Until we support these corner cases,
you can fall back to the REST API for protected users.

For automated hashtag searching, you should also be using the
Streaming API. The track feature will give you all hashtags search for
up to a fairly generous proportion of the total stream of tweets.

-John Kalucki
http://twitter.com/jkalucki
Services, Twitter Inc.



On Fri, Jan 1, 2010 at 2:43 PM, jojet j...@jojet.com wrote:
 Hi all,
 I was feeling a little clever after working on some Twitter API stuff
 but then thought oh! I'd better think about Twitters rate
 limiting...and then that's where my brain started to melt!

 A few bits of info: my web app needs people to authenticate (OAUTH)
 and, from then on, the app analyses their tweets and occasionally
 updates registered user's statuses.

 I've applied for the webserver IP to be white listed which I believe
 gives the app 20,000 requests per hour.

 I've not found the search API to be great when looking for a hashtag
 (sometimes tweets just don't seem to get indexed) so I've gone a stage
 further and am analysing the individual timelines of all my registered
 users via a cron job (the cron job sucks in all of a persons tweets
 greater than the last analysed tweet of the user). This call is made
 via OAUTH/authenticated so I believe such a call depletes the user's
 rate limit quota rather than the IP/authenticated account of the
 webserver quota? Is that correct?

 Thanks for any thoughts here

 Joel









[twitter-dev] Rate Limiting Question

2009-08-05 Thread Bob Fishel

From the Rate Limiting documentation:

IP whitelisting takes precedence to account rate limits. GET requests
from a whitelisted IP address made on a user's behalf will be deducted
from the whitelisted IP's limit, not the users. Therefore, IP-based
whitelisting is a best practice for applications that request many
users' data.

Say for example I wanted to simply replicate the twitter website. One
page per user that just monitors for new statuses with authenticated
(to catch protected users) calls to
http://twitter.com/statuses/friends_timeline.json

Say I was very popular and had 20k people on the site. Would this
limit me to 1 call per minute per user or would it fall over to the
user limit of 150 an hour once I hit my 20k? If so how can I tell it
has fallen over besides for simply keeping track of the number of
calls per hour my server has made.

Thanks

-Bob