Multiple streaming connections, from different IPs


#1

Hello,

I’m working with a team to develop a web audio app that relates to Twitter. Right now we are having problems with the Twitter stream stopping and jumping around when multiple users are on the site.

We are pretty sure the problem comes from us querying the streaming API on page load, thus initiating multiple connections to the stream when more than one person is looking at the site. What are best practices for this? Is there a way to open up a single connection and feed an entire app with this data?

Also, this morning I noticed a help topic mentions that ‘For general streams, you should only make one connection from the same IP.’ Does this mean that in our scenario, if users connect from different IP addresses there won’t be any stream issues? Again, what’s the best practice for this?

Thank you,
Tyler


#2

Take a look at [node:14935] for discussion around this…

You definitely shouldn’t be re-establishing connections that frequently. You should really have only one connection representing your entire application and all possible users of your application – it’s not meant to be used the way you’re approaching it right now.

If you’re trying to support a service where track terms change frequently, the Streaming API probably won’t be a good fit for you.