javascript - How to architect a cluster of streaming clients in node.js in case of one goes down? -
right now, we're writing streaming client using node.js listen twitter. wondering have prevent failure don't lose data. can have 2 boxes running mean duplicate data. deploy code amazon ec2. tool or pattern architect clusters of streaming client? so, if 1 box goes down next box intercept data. don't want have 2 boxes listening , filter out duplicate tweets.
this example code,
client.stream('statuses/filter', {track: 'javascript'}, function(stream) { stream.on('data', function(tweet) { console.log(tweet.text); }); stream.on('error', function(error) { throw error; }); });
Comments
Post a Comment