I am using Twitter streaming APIs to fetch latest tweets from Twitter and respond to them if they match a certain criteria (a particular Hashtag) If deployed on one instance, it works very well as their is only one app responding to the tweets.
If I want to scale this to multiple instances, there will be many apps that would process the same tweet. A probable solution I thought was to maintain a common db where every time I pickup a tweet, before responding to them I enter it into db and other instances check if the tweet is responded or not. But it does not seems to be right as it would slow down the process and might act weird is both instances pick same tweet at same time.
Sorry if posted in wrong forum.