3

I understand that the Twitter streaming API only allows for a single connection per user account on Twitter. I was wondering if multiple streaming connections from the same IP address are allowed, if each connection has credentials from a different user account? For example, in a scenario where a single server may process tweets for multiple users. Specifically, I am curious about the filtered public streams endpoint.

I have read the following, and cannot locate an answer:
Twitter Streaming API limits?
https://dev.twitter.com/rest/public/rate-limiting
https://dev.twitter.com/streaming/public

Thank you, -Matt

Community
  • 1
  • 1
Matt
  • 910
  • 7
  • 21

2 Answers2

1

I can confirm that I have three different Twitter API streams in a Node-RED application running on the same IP with no problem. Whenever I make changes or redeploy I do get rate limit errors for the first minute or so, but they go away and do not appear again.

1

The standard Streaming API supports up to two connections on a single IP. Any more than that will result in the oldest stream being disconnected. The developer agreement and policy states that you should not use multiple application keys and/or IP addresses to circumvent this limitation.

Note that it is on the roadmap for the standard filter and sample streams to eventually be updated with new versions, but it is not yet clear if they will carry the same connection limitations.

Andy Piper
  • 11,422
  • 2
  • 26
  • 49
  • Is the two connection limit per-IP documented anywhere? Not looking to use multiple application keys or IP addresses, was more interested if a SaaS project can use multiple users' streaming API keys from the same IP address to process different tweets for different users. – Matt Feb 05 '18 at 19:05
  • 1
    There's some information about connections and limits on this page. https://developer.twitter.com/en/docs/tweets/filter-realtime/guides/connecting I believe different user credentials should be fine. – Andy Piper Feb 06 '18 at 18:46
  • what if the machines are behind a WAN inside a LAN? would that be considered as single IP? – user482963 Aug 10 '18 at 12:48
  • Most likely yes – Andy Piper Aug 10 '18 at 12:49