title: Redis queue in node.js for database inserts
body: <p>I need some help on figure out what best practice would be in case when you need to insert a lot of data for each request when using node, redis and lets say MySQL/MongoDB.</p>
  
  <p>How would you set up a queue to handle each request like this:</p>
  
  <ul>
  <li>The user request a url within my app, ie /route/insert-data</li>
  <li>The server handles the request, adds it to a Redis queue, and sends back status 200 to the user</li>
  <li>With some kind of interval the application checks if there is anything in the redis queue, if so, it will pick the oldest one, insert it to the database, and then remove the key from redis</li>
  </ul>
  
  <p>What would be the best approach here? I'm currently have a express app setup.</p>
  
  <p>Thanks!</p>