title: How to architect a cluster of streaming clients in node.js in case of one goes down?
body: <p>Right now, We're writing a streaming client using node.js to listen to Twitter. I was wondering what do I have to do to prevent any failure so we don't lose any data. I can have two boxes running but that would also mean we get duplicate data. We will deploy the code to Amazon EC2. What tool or pattern will help to architect clusters of streaming client? So, if one box goes down the next box will intercept the data. I don't want to have two boxes listening and filter out duplicate tweets. </p>
  
  <p>This is the example code,</p>
  
  <pre><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;
    });
  });
  </code></pre>